korn shell between Solaris and Linux
Is there any difference on korn shell between Solaris and Linux? I have a project to convert Solaris to Linux and one of the requirements is to move the korn shell from Solaris to Linux.
Thanks, |
I take it you don't mean this literally
Quote:
However, the default is to use the GNU version of the *nix cmd line tools, so there will be differences eg see the 'find' cmd |
Today morning I was reading about korn shell on redhat and I found this useful information.
If we talk about Red Hat Linux, as with most UNIX-like operating systems, the system shell on Red Hat Enterprise Linux is a version of the Bourne shell. Red Hat Enterprise Linux implements the GNU Bourne-Again shell, or Bash. Bash is compliant with IEEE Standard 1003.1 from the POSIX specification, and most scripts written for /bin/sh on Solaris should run fine under /bin/sh on Red Hat Enterprise Linux. Red Hat Enterprise Linux also ships the Korn shell, so porting ksh scripts from Solaris is relatively simple. Solaris 10 ships with Korn shell version 88, whereas Red Hat Enterprise Linux ships version 93.1 ksh-93 is the current version of AT&T Korn shell and adds support for associative arrays and floating point arithmetic. On the whole, ksh-93 is backwards compatible with ksh-88. Here are a few notable exceptions: • Variables in functions declared with the “name()” syntax are no longer local. • ksh-93 does not set the ERRNO environment variable. • Testing for string equality via the “=” operator is supported, but obsolete. Instead, use “==”. • The “-x” option to alias is no longer supported. • The “-f” option to typeset is no longer supported. • The output formats of some built-in functions including set, typeset, and alias has changed. |
Here are some examples of the differences between the two sets of utilities that need to be considered when
porting shell scripts: • GNU cat does not support the -s option. • GNU sum uses the BSD method for computing checksums, not the System V (this behavior is available on Solaris using the “-r” option). For System V behavior, use the “-s” flag. • GNU sort does not support the “-y”, “-z”, or the “+” options, which are listed as obsolete in Solaris 10. • The default ordering of files in the output from ls differs on Red Hat Enterprise Linux. • The df command on Red Hat Enterprise Linux behaves like the BSD df (/usr/ucb/df). • GNU echo behaves like the Berkeley echo (/usr/ucb/echo) and does not implement backslash escapes. • GNU uname differs quite a bit from Solaris uname. • The GNU install command takes different options that both /usr/bin/install and /usr/ucb/install on Solaris. |
All times are GMT -5. The time now is 08:08 AM. |