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
Forums
Discussions
Discussions
Discussions
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
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-21-2008 01:01 PM
08-21-2008 01:01 PM
PATH
I have a script script.sh in a directory /usr/master1/pat
I have to give full path name as below to get the script running. i need to make it as just the script name .Any idea.
#/usr/master/pat/script1.sh
works
#pwd
#/usr/master/pat
script.sh
does not work
i need to update PATH to PATH:. but the problem is not sure which env file is thi susing cause .profile , profile has . in the PATH definition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 01:16 PM
08-21-2008 01:16 PM
Re: PATH
#./script.sh
you can set the PATH this way
#export PATH=$PATH:/usr/master/pat
you can also but that line in your .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 01:35 PM
08-21-2008 01:35 PM
Re: PATH
"echo $PATH" to see what you have.
> [...] profile has . in the PATH definition
Which "[.]profile"? Whose "[.]profile"?
This might be easier to puzzle out if anyone
other than you could see what's in your PATH
and/or .profile. And if we knew which shell
you use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 01:36 PM
08-21-2008 01:36 PM
Re: PATH
in your subject, so we non-psychics could
save some time and effort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 02:15 PM
08-21-2008 02:15 PM
Re: PATH
The "#" prompt suggests that you are running the script as root.
Learn to do:
# ./script.sh
Do *NOT* add '.' to root's PATH. It is a security hole. In fact, this is documented in 'root's '.profile' (which would be the other part of your question).
A '.profile' is read when you 'su -'. If you simply do 'su' the target user's .profile is *not* read.
Regards!
...JRF...