- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Posix Shell Vs Korn Shell
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 05:44 AM
тАО10-24-2002 05:44 AM
Secondly, I looking to change the default shell for users logging onto HP-UX 11 system from Posix to Korn.
All our scripts have #!/bin/sh as the first line. If I change the users default shell, will this affect the execution of these scripts?
Thanks,
Glynn.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 05:46 AM
тАО10-24-2002 05:46 AM
Re: Posix Shell Vs Korn Shell
An answer to the second question: No, it shouldn't cause a problem; The scripts will merely run in a Bourne subshell.
Hope this helps
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 05:55 AM
тАО10-24-2002 05:55 AM
Re: Posix Shell Vs Korn Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 06:00 AM
тАО10-24-2002 06:00 AM
Re: Posix Shell Vs Korn Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 06:01 AM
тАО10-24-2002 06:01 AM
Re: Posix Shell Vs Korn Shell
I'm quoting from a HP Posix Shell Programming course book:
. The POSIX shell is very similar to the Korn shell
. The POSIX shell is fully compliant with the IEEE P1003.2 recommendations
. These POSIX recommendations are adopted as the industry standard.
. The POSIX shell is essentially compatible with the HP-UX Korn shell
So, the differences then are slight at best, and the POSIX shell is more standards compliant and accepted - I'd go with POSIX rather than Korn.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 06:01 AM
тАО10-24-2002 06:01 AM
Re: Posix Shell Vs Korn Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 06:02 AM
тАО10-24-2002 06:02 AM
SolutionA - Posix Shell and Korn Shell are very similar. You have to use it in depth to see differences ...
B - The first line of a script beginning with #!xxx only indicates the interpretor to use. So it could contain anything and it absolutly not related to your logging shell, but I just wanted to add that /bin/sh shouldn't be used anymore because it's a transition link maintained only for compatibility with old releases. You should now rather use #!/usr/bin/sh
Regards,
jean-Louis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 06:13 AM
тАО10-24-2002 06:13 AM
Re: Posix Shell Vs Korn Shell
All functions of the korn shell are contained in the Posix shell and more.
So you could consider ksh to be a subset of sh OR that sh is a superset of ksh.
I prefer the Posix to the korn.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 06:36 AM
тАО10-24-2002 06:36 AM
Re: Posix Shell Vs Korn Shell
Don't change root's shell. It needs to be /sbin/sh (note that's /sbin/sh, not /bin/sh). You will be likely to find you can't boot your system if you change it.
If you have #!/bin/sh as the first line in your script, that's the shell (posix) that will be used. It won't matter what shell is specified for the user in /etc/passwd.
Using ksh instead of posix is okay. You lose some functionality that is added in the posix shell. If you use ksh on other systems, you may be more comfortable doing so on HPUX also (though whatever you do in ksh can be done in posix). Also, if you always write your scripts in ksh, they will be more easily portable to other platforms.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 04:58 PM
тАО10-24-2002 04:58 PM
Re: Posix Shell Vs Korn Shell
- Is the default shell for HPUX-10.20 and above
- Having almost similar features as the Korn Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 06:13 PM
тАО10-24-2002 06:13 PM
Re: Posix Shell Vs Korn Shell
Generally, there is more functionality in /usr/bin/sh than found in ksh. To see the exact difference, look at the Release Notes found in /usr/share/doc for the details. The Bourne is virtually unknown (and unused) in HP-UX because it is located in /usr/old/bin/sh. As mentioned, root's shell must be /sbin/sh in order to function in single user mode. Do not change root's shell to anything in /usr as single user mode will fail.
As an additional note: there is no such directory /bin. It has not existed for more than 8 years as it was obsoleted by the SysV.4 filesystem standard. Other flavors of Unix such as Solaris have also migrated out of /bin. To provide backward compatibility, /bin is actually a symbolic link (called a transition link in HP-UX). These links are simply crutches to keep things running until all your tools have been migrated. tlinstall and tlremove will create and remove these links. NOTE: there is no guarentee that these old links will exist in future releases.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 07:04 AM
тАО10-25-2002 07:04 AM
Re: Posix Shell Vs Korn Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 08:11 AM
тАО10-25-2002 08:11 AM
Re: Posix Shell Vs Korn Shell
One should use the vipw command as it will lock the file during edit & post-process it for any changes occuring from another source while being "manually" edited.
It has the further benefit of NOT allowing you to screw up root's entry such that the system would be unbootable.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 08:14 AM
тАО10-25-2002 08:14 AM
Re: Posix Shell Vs Korn Shell
Just my 2cents,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 08:27 AM
тАО10-25-2002 08:27 AM
Re: Posix Shell Vs Korn Shell
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 06:42 AM
тАО12-03-2002 06:42 AM