LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-01-2012, 10:24 PM   #1
brian00
Member
 
Registered: Aug 2011
Posts: 33

Rep: Reputation: Disabled
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,
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-01-2012, 10:37 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
I take it you don't mean this literally
Quote:
move the korn shell from Solaris to Linux.
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
 
Old 02-01-2012, 10:45 PM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
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.
 
2 members found this post helpful.
Old 02-01-2012, 11:08 PM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Diffrence between Korn and bash shell in Linux msivasakthi Linux - General 4 04-13-2011 12:52 AM
korn shell loop jonlake Programming 2 03-28-2008 12:10 PM
install korn shell namgor Linux - Newbie 1 07-12-2004 02:52 PM
a t&t korn shell 93 shook Linux - Software 4 02-01-2003 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration