- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- exporting PATH
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
Forums
Discussions
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
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-23-2001 09:26 AM
01-23-2001 09:26 AM
exporting PATH
I created a script and put it on my local dir then include it on my existing PATH using the command "export PATH=$PATH:/users/jdean/test.sh"
When I run echo $PATH I could see already my new dir included. Now my question is, why is it whenever I run "whereis test.sh" from the command line from any dir, system could not find my script to think it's already included in my PATH?
Also I noticed that, when I copied files or scripts to our /usr/local/bin dir which I added also on my existing PATH the "whereis" command can locate these files or script from any dir I'm in.
Any Ideas? Did I miss something here?
Thanks in advance
Joey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 09:41 AM
01-23-2001 09:41 AM
Re: exporting PATH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 09:43 AM
01-23-2001 09:43 AM
Re: exporting PATH
You need to change your path statement to:
export PATH=$PATH:/users/jdean
Don't include the file name, just the path to the filename.
Mo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 10:47 AM
01-23-2001 10:47 AM
Re: exporting PATH
Sorry I did'nt mean to include the file or the script when exporting path "typo error". Actually I exported this dir without the file or script just the dir but it didnt work.
Any ideas?
Thanks
Joey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 11:03 AM
01-23-2001 11:03 AM
Re: exporting PATH
The man pages for 'whereis' note that whereis ..."attempts to locate the desired program in a list of standard places". This is the reason you are not getting a 'hit'.
You can execute 'whereis' for a non-standard directory (or directories) like this, for instance:
# whereis -B /tmp /var/tmp -f ls
This would look in /tmp and in /var/tmp for the 'ls' executable.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 04:14 PM
01-23-2001 04:14 PM
Re: exporting PATH
whence -v ksh
or
whence -v history
will tell you exactly what will occur, whether the command is a builtin (like fc), an alias (like history) or found some where along the $PATH list. Always use whence to test for 'where did this command come from?'
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2001 12:23 AM
01-24-2001 12:23 AM
Re: exporting PATH
If you use 'which test.sh' it surely will show you the path to the file.
see 'which' manpage.
Best regards,
Dan