- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- What can I do in Ksh which cannot be done in Bourn...
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
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
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
тАО06-10-2004 08:21 AM
тАО06-10-2004 08:21 AM
I have a few books on Bourne and Korn shell scripting.
All I'd like to know is what can I do in a Korn shell which I cannot do in Bourne shell (since at this point they seem similar).
Thanks.
Solved! Go to Solution.
- Tags:
- ksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 08:27 AM
тАО06-10-2004 08:27 AM
Re: What can I do in Ksh which cannot be done in Bourne shell?
Lots. Too many to list....
Better yet to use the POSIX shell.
Hierarchy is as follows - Bourne is a subset of Korn which is a subset of POSIX shell.
If you really want to tear your hair out use the C-shell or even the tcsh shell......
Or if you're a die-hard penguin-head use bash.
Cheers,
Jeff
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 08:28 AM
тАО06-10-2004 08:28 AM
Re: What can I do in Ksh which cannot be done in Bourne shell?
However, a real bourne shell can't to co-processing, can't do job control (fg, bg, kill %1 etc) can't do maths with "((" and "))", can't use "$(" with ")" instead of backticks, can't do arrays etc etc etc etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 08:28 AM
тАО06-10-2004 08:28 AM
Re: What can I do in Ksh which cannot be done in Bourne shell?
Here is a link to a page that talks about the differences:
http://www.sniffer.net/bookshelf_do_sniffer/unix/ksh/appa_01.htm
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 08:31 AM
тАО06-10-2004 08:31 AM
Solutionsh csh ksh bash tcsh zsh rc es
Job control N Y Y Y Y Y N N
Aliases N Y Y Y Y Y N N
Shell functions Y(1) N Y Y N Y Y Y
"Sensible" Input/Output redirection Y N Y Y N Y Y Y
Directory stack N Y Y Y Y Y F F
Command history N Y Y Y Y Y L L
Command line editing N N Y Y Y Y L L
Vi Command line editing N N Y Y Y(3) Y L L
Emacs Command line editing N N Y Y Y Y L L
Rebindable Command line editing N N N Y Y Y L L
User name look up N Y Y Y Y Y L L
Login/Logout watching N N N N Y Y F F
Filename completion N Y(1) Y Y Y Y L L
Username completion N Y(2) Y Y Y Y L L
Hostname completion N Y(2) Y Y Y Y L L
History completion N N N Y Y Y L L
Fully programmable Completion N N N N Y Y N N
Mh Mailbox completion N N N N(4) N(6) N(6) N N
Co Processes N N Y N N Y N N
Builtin artithmetic evaluation N Y Y Y Y Y N N
Can follow symbolic links invisibly N N Y Y Y Y N N
Periodic command execution N N N N Y Y N N
Custom Prompt (easily) N N Y Y Y Y Y Y
Sun Keyboard Hack N N N N N Y N N
Spelling Correction N N N N Y Y N N
Process Substitution N N N Y(2) N Y Y Y
Underlying Syntax sh csh sh sh csh sh rc rc
Freely Available N N N(5) Y Y Y Y Y
Checks Mailbox N Y Y Y Y Y F F
Tty Sanity Checking N N N N Y Y N N
Can cope with large argument lists Y N Y Y Y Y Y Y
Has non-interactive startup file N Y Y(7) Y(7) Y Y N N
Has non-login startup file N Y Y(7) Y Y Y N N
Can avoid user startup files N Y N Y N Y Y Y
Can specify startup file N N Y Y N N N N
Low level command redefinition N N N N N N N Y
Has anonymous functions N N N N N N Y Y
List Variables N Y Y N Y Y Y Y
Full signal trap handling Y N Y Y N Y Y Y
File no clobber ability N Y Y Y Y Y N F
Local variables N N Y Y N Y Y Y
Lexically scoped variables N N N N N N N Y
Exceptions N N N N N N N Y
Key to the table above.
Y Feature can be done using this shell.
N Feature is not present in the shell.
F Feature can only be done by using the shells function
mechanism.
L The readline library must be linked into the shell to enable
this Feature.
U can see this better at the following web page,
http://64.233.161.104/search?q=cache:HY2sqaQd-u8J:www.faqs.org/faqs/unix-faq/shell/shell-differences/+csh+bourne+shell+difference&hl=en&start=1
- Tags:
- shells
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 08:33 AM
тАО06-10-2004 08:33 AM
Re: What can I do in Ksh which cannot be done in Bourne shell?
And I hate to type
live free or die
harry
- Tags:
- history
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 08:35 AM
тАО06-10-2004 08:35 AM
Re: What can I do in Ksh which cannot be done in Bourne shell?
thanks folks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 08:37 AM
тАО06-10-2004 08:37 AM
Re: What can I do in Ksh which cannot be done in Bourne shell?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 09:45 AM
тАО06-10-2004 09:45 AM
Re: What can I do in Ksh which cannot be done in Bourne shell?
The answer is, (with tongue firmly in cheek), from a C.S. standpoint, there is nothing you can do ( i.e. accomplish) in ksh that you can't do in sh ( Bourne or POSIX), or vice versa. You just may have to do (code) some things differently.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2004 01:45 PM
тАО06-10-2004 01:45 PM
Re: What can I do in Ksh which cannot be done in Bourne shell?
If you learn Bourne, you'll have some basics but you'll tend to write with Bourne limitations (like PATH=/usr/bin;export PATH, rather than the POSIX construct: export PATH=/usr/bin). Most sysadmins use a POSIX shell so spend most of your time in the Korn shell book. The Korn/Bolsky book is a good reference but does not have a lot of how-to or examples.
Bill Hassell, sysadmin