Re: scripting differences between hpux and linux

Hey;

As posted, it's almost certainly one more little difference between ksh and bash. Bash is pretty close, but certainly not an exact copy of ksh. Check out array definition for more entertaining differences.

There are ksh rpms for linux. Depending on the distro, it may already be installed. Just switch the shell and you'll be good, I think.

Re: scripting differences between hpux and linux

as others have pointed out, by doing "sh test" you are using a different shell - use the same shell (ksh) and you will get consistent results. I presume the line "#!/usr/ksh" at the top of your script was a typo for "#!/usr/bin/ksh". Here's what I get on my HP-UX/Linux systems:

Re: scripting differences between hpux and linux

Once you put this line at the top

#!/usr/ksh

That is what the script is going to run under. If you have pdksh on the linux box, then it will run under the korn shell.

"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"