1829012 Members
2375 Online
109986 Solutions
New Discussion

Posix vs Ksh shells

 
Sheelah Brennan
Occasional Advisor

Posix vs Ksh shells

Hi-

I'm wondering what the difference is between posix (/usr/bin/sh) vs ksh (/usr/bin/ksh) in HP-UX 11.0.

I'm trying to run a command at the command line that is over 256 characters. When I paste it from Notepad to my terminal window (posix shell), it won't paste in the whole command. Yet if I try pasting into a korn shell window, it works fine! I thought that posix shell handles everything that korn does, and more. Anyone know why the pasting of a long line won't work in posix? I had the posix shell set as default shell for my user account. Thanks.
6 REPLIES 6
John Kittel
Trusted Contributor

Re: Posix vs Ksh shells

someone else asked the same question a couple days ago...

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=148452
John Kittel
Trusted Contributor

Re: Posix vs Ksh shells

well not exactly the same; only the first part was the same. sorry, I jumped the gun again...
Mel Burslan
Honored Contributor

Re: Posix vs Ksh shells

I think this is a limitation of POSIX shell and you can not do much about it short of using ksh.

Yes POSIX is a superset of ksh but this is command-wise. The commands running on ksh will run on POSIX and then some, but when it comes to the environmental settings, subset/superset conmcepts do not conform with the concept.
________________________________
UNIX because I majored in cryptology...
R. Sri Ram Kishore_1
Respected Contributor

Re: Posix vs Ksh shells

Hi,
Check out this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=611474

Also, take a look at these links for a very detailed comparison of features of all the shells:
a) http://www.cee.odu.edu/uclhd/uclhd_unix_different_shell.php#shell_feature
b) http://bcebhagalpur.net/tutorials/shell/shell.htm
c) http://cbbrowne.com/info/unixshells.html

HTH.

Regards,
Sri Ram
"What goes up must come down. Ask any system administrator."
dirk dierickx
Honored Contributor

Re: Posix vs Ksh shells

you can always continue your command on a new line using '\' at the end. sometimes it makes understanding the commands easier as well because they are split up.
Geoff Wild
Honored Contributor

Re: Posix vs Ksh shells

There is a ton of information on shells in general:

http://docsrv.sco.com/DIFFS/UNIX95_Conformance.html


From: http://www.dartmouth.edu/~rc/classes/ksh/print_pages.shtml

POSIX 1003.2 Shell Standard.
Standards committees worked over the Bourne shell and added many features of the Korn shell (ksh88) and C shell to define a standard set of features which all compliant shells must have. On most systems, /bin/sh is now a POSIX compliant shell. Korn shell and Bash are POSIX compliant, but have many features which go beyond the standard. On Solaris, the POSIX/XPG4 commands which differ slightly in behaviour from traditional SunOS commands are located in /usr/xpg4/bin


http://www.sniffer.net/bookshelf_do_sniffer/unix/ksh/appa_02.htm

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.