- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- korn and borne 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
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
тАО08-14-2005 04:33 PM
тАО08-14-2005 04:33 PM
If a process needs to be started as korn shell and someone by mistake starts in bourne shell then what would be the repercussion of this ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2005 04:53 PM
тАО08-14-2005 04:53 PM
Re: korn and borne shell
There are also a few differences in how the two shells react to certain extremely pathological input. Usually, the Korn shell processes correctly what causes the Bourne shell to "choke."
The Bourne shell is the standard shell and provides the following features:
*Input/output redirection.
*Wildcard characters (metacharacters) for filename abbreviation.
*Shell variables for customizing your environment.
*A built-in command set for writing shell programs.
*Job control (beginning in SVR4).
The Korn shell is a backward-compatible extension of the Bourne shell. Features that are valid only in the Korn shell are so indicated.
*Command-line editing (using vi or emacs).
*Access to previous commands (command history).
*Integer arithmetic.
*More ways to match patterns and substitute variables.
*Arrays and arithmetic expressions.
*Command name abbreviation (aliasing).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2005 04:54 PM
тАО08-14-2005 04:54 PM
Re: korn and borne shell
the Korn shell is more complex than the bourne shell such that it has a wider set of commands!
the risk is that some commands may not execute properly but this is much unlikely...
Normally, you can force a script to use a particular shell by specifying the shell to use:
e.g. the first line would be:
#!/bin/sh
or
#!/bin/ksh
again read page 468 of marty's book!
regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2005 05:35 PM
тАО08-14-2005 05:35 PM
Re: korn and borne shell
The Bourne shell is the standard shell and provides the following features:
Input/output redirection.
Wildcard characters (metacharacters) for filename abbreviation.
Shell variables for customizing your environment.
A built-in command set for writing shell programs.
Job control (beginning in SVR4).
The Korn shell is a backward-compatible extension of the Bourne shell. Features that are valid only in the Korn shell are so indicated.
Command-line editing (using vi or emacs).
Access to previous commands (command history).
Integer arithmetic.
More ways to match patterns and substitute variables.
Arrays and arithmetic expressions.
Command name abbreviation (aliasing).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2005 05:37 PM
тАО08-14-2005 05:37 PM
Re: korn and borne shell
refer to these docs:
http://docs.hp.com/en/B2355-90046/ch15s03.html
http://docs.hp.com/en/B2355-90164/ch03s04.html
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2005 06:03 PM
тАО08-14-2005 06:03 PM
Re: korn and borne shell
Following links may be of help for the subject
http://docs.hp.com/en/B2355-90046/ch01s01.html
http://docs.hp.com/en/B2355-90046/ch15s03.html
Regards
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2005 02:28 AM
тАО08-15-2005 02:28 AM
Solution#!/usr/bin/ksh
...rest of script...
NOTE: /bin is not a directory anymore, and it exists (just like in Solaris and other modern Unix systems) as symbolic link to /usr/bin. Also note that unless the user logged in and typed the command: /us/old/bin/sh, yiou are not running the Bourne shell. The default shell for HP-UX (unlike other Unix flavors) is /usr/bin/sh (/sbin/sh for root) and is a POSIX shell, virtually identical to Korn shell and other POSIX-compliant shells like bash.
If you run a script without the interpreter line, then the current shell will be invoked to run the script. If your Korn shell script has a statement like:
export x=1
then you'll get an error message:
x=1: is not an identifier
if you are running the Bourne shell but it is perfectly valid in a POSIX shell.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2005 08:39 AM
тАО08-15-2005 08:39 AM
Re: korn and borne shell
#!/usr/bin/
This way nobody can accidentally launch scripts in a shell meant for another shell.
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2005 01:26 AM
тАО08-16-2005 01:26 AM
Re: korn and borne shell
Is your bourne shell program a subshell? If so at the outside it may require a minor environment tweak at the top of your shell script.
What is does the script do, how does it work may provide others here with insight as to whether it will complete successfully or fail.
I generally write my scripts for bourne, as this is the most backward compatible. However, I have many scripts written for korn specifically and must be initiated in a korn. No way around it. They crash if ran in anything other then korn or bash. bash will run korn shells, (bourne again shell) is generally incorporated on Linux, and is not native to HP/UX, there is a port for it.