Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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,
Click here to see the post LQ members have rated as the most helpful post in this thread.
Linux has a perfectly good implementation of ksh.
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
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
Rep:
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.
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.