- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ksh script echoing path where script is locate...
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
тАО03-17-2005 10:40 AM
тАО03-17-2005 10:40 AM
John Garrott
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2005 10:51 AM
тАО03-17-2005 10:51 AM
Re: ksh script echoing path where script is located
have to see the line of script that displays the path to
be able to answer this.
- Biswajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2005 12:38 PM
тАО03-17-2005 12:38 PM
Re: ksh script echoing path where script is located
As stated above - let's see the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2005 09:20 PM
тАО03-17-2005 09:20 PM
Re: ksh script echoing path where script is located
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2005 11:19 PM
тАО03-17-2005 11:19 PM
SolutionI pesume you mean that when doing a ps -ef
other users can see the full path.
Use the ln command to make a soft link from the users home dir to the script to run
> /bin/ps -ef|grep ps
root 57 0 0 Mar 11 ? 0:00 supsched
lp 1029 1 0 Mar 11 ? 0:10 /usr/sbin/lpsched
root 1281 1 0 Mar 11 ? 1:18 /opt/sharedprint/bin/spserver
steves 5302 5270 3 13:21:48 pts/0 0:00 /bin/ps -ef
>ln -s /bin/ps ps
>./ps -ef|grep ps
root 57 0 0 Mar 11 ? 0:00 supsched
lp 1029 1 0 Mar 11 ? 0:10 /usr/sbin/lpsched
root 1281 1 0 Mar 11 ? 1:18 /opt/sharedprint/bin/spserver
steves 5325 5270 4 13:22:21 pts/0 0:00 ./ps -ef
Steve Steel
- Tags:
- PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2005 09:33 AM
тАО03-18-2005 09:33 AM
Re: ksh script echoing path where script is located
> Must be doing echo $0?
Actually that would only display the program name as
invoked by user. So, if the user does not use absolute
path while running the program, $0 would not display
absolute path. My guess is, the script is using a
command like "which", "type" or "whereis".
- Biswajit