Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between ksh and sh

SOLVED
Go to solution
Mohamed K Ahmed
Trusted Contributor

Difference between ksh and sh

What is the difference betweenthe shells ksh and sh?
also /usr/bin/sh and /bin/sh?
The operating system is Tru64 Unix V 5.1B

Thanks
2 REPLIES
Mark Grant
Honored Contributor
Solution

Re: Difference between ksh and sh

It's slightly more complicated than that. /usr/bin/sh is the old bourne shell and doesn't support a lot of stuff that the korn sheel does e.g job control, the [[ test, the $(mycommand) construct and a whole host of other things. The korn shell is far more functional and exciting and support command line editing etc etc etc.

However, Tru64 also has /usr/bin/posix/sh which retains compatbility with the bourne shell and yet has all the exciting functionality of the Korn shell. I believe that ksh is, in fact the posix shell on recent versions of the OS. Which shell you get is determined by the final field in /etc/passwd.

In other words, use the korn shell.
Never preceed any demonstration with anything more predictive than "watch this"
RACAPE
Occasional Visitor

Re: Difference between ksh and sh

The shell ksh use library dynamic and the
sh use library static and this last is adviced for maintenance .