- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- What is the difference between #!/bin/ksh and #!/u...
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
тАО01-14-2002 06:51 AM
тАО01-14-2002 06:51 AM
I have written a few Kron shell scripts on HP-UX 10.20 and some on 11. I have been using #!/bin/ksh. Looking at the HP documentation - should I be using #!/usr/bin/ksh?
regards
Eric
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2002 06:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2002 07:01 AM
тАО01-14-2002 07:01 AM
Re: What is the difference between #!/bin/ksh and #!/usr/bin/ksh
# ll /bin
lr-xr-xr-t 1 root sys 8 Dec 6 14:43 /bin -> /usr/bin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2002 07:04 AM
тАО01-14-2002 07:04 AM
Re: What is the difference between #!/bin/ksh and #!/usr/bin/ksh
/bin is a symbolic link to /usr/bin and contains binaries that are dynamically linked. In comparison, /sbin contains statically linked binaries. In single-user mode, /usr is not mounted. Thus for shell scripts to run as well in single-user mode, shell interpreters in /sbin (and not /bin and /usr/bin) have to be referenced in the scripts instead eg. #!/sbin/sh.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2002 07:04 AM
тАО01-14-2002 07:04 AM
Re: What is the difference between #!/bin/ksh and #!/usr/bin/ksh
They're the same file, hard-linked:
ls -i /usr/bin/ksh /bin/ksh
9827 /bin/ksh 9827 /usr/bin/ksh
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2002 07:10 AM
тАО01-14-2002 07:10 AM
Re: What is the difference between #!/bin/ksh and #!/usr/bin/ksh
Apologies, /usr/bin/ksh & /usr/bin/rksh are hard-linked. As Steven says, /bin is a softlink to /usr/bin.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2002 07:10 AM
тАО01-14-2002 07:10 AM
Re: What is the difference between #!/bin/ksh and #!/usr/bin/ksh
Both are same as mentioned. See this guide for 'ksh':
http://www.docs.hp.com/hpux/onlinedocs/B2355-90680/B2355-90680.html
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2002 07:35 AM
тАО01-14-2002 07:35 AM
Re: What is the difference between #!/bin/ksh and #!/usr/bin/ksh
The important note here is that /bin is a transition link to /usr/bin. Transition links were provided for 9.x to 10.x when the filesystem layouts changed. Another example of a transition link is /lib which is really a link to /usr/lib. Ideally, one should use the direct reference.
While this paper ("HP-UX 10.0 File System Layout Whitepaper:) is old, it is an interesting one:
http://docs.hp.com/hpux/onlinedocs/5963-8942/5963-8942.html
Regards!
...JRF...