- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Korn Shell Programming on hp-ux 11i
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
тАО03-27-2003 07:38 PM
тАО03-27-2003 07:38 PM
Korn Shell Programming on hp-ux 11i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2003 08:15 PM
тАО03-27-2003 08:15 PM
Re: Korn Shell Programming on hp-ux 11i
If not I wouldn't worry about it, as good practice dictates that you specify the shell in the first line of any script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2003 08:45 PM
тАО03-27-2003 08:45 PM
Re: Korn Shell Programming on hp-ux 11i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 03:17 AM
тАО03-28-2003 03:17 AM
Re: Korn Shell Programming on hp-ux 11i
And by the way, it is /usr/bin/ksh, not /bin/ksh. On *most* *HP-UX* systems, the latter is symbolically linked to the former, but relying on that is another accident waiting to happen.
An yet another by the way: On HP-UX there is no good/valid reason to use the Korn shell instead of the POSIX shell, because the latter is a superset of the former.
[1]:
ws$ cat doit
# This is a ksh script.
VARIABLE=content
ws$ ./doit
VARIABLE=content: Command not found.
ws$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 04:14 AM
тАО03-28-2003 04:14 AM
Re: Korn Shell Programming on hp-ux 11i
.
.
.
#!/usr/bin/sh (* Now use this command set *)
.
.
.
.
#!/usr/bin/csh (* Now use this command set *)
All you're doing is redirecting the lines in the script to a different command set. First korn, then Posix and then C shell. And you invoke a korn shell command that doesn't appear in the C shell command set after redirecting to C shell, then it will fail to execute.
There are no wasted resources by redirecting to another command set, or shell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 04:14 AM
тАО03-28-2003 04:14 AM
Re: Korn Shell Programming on hp-ux 11i
.
.
.
#!/usr/bin/sh (* Now use this command set *)
.
.
.
.
#!/usr/bin/csh (* Now use this command set *)
All you're doing is redirecting the lines in the script to a different command set. First korn, then Posix and then C shell. If you invoke a korn shell command that doesn't appear in the C shell command set after redirecting to C shell, then it will fail to execute.
There are no wasted resources by redirecting to another command set, or shell.