- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- variable 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
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
12-21-2004 03:31 AM
12-21-2004 03:31 AM
variable path
i have hp-ux v 10.20
i want to make a variable path for a specified directory.
i try the following :
x=/home/kamal/test
when type cd $x
my pwd is /home/kamal/test
but it is temporary.
at next connection
when i type cd $x
the following error appear
sh: x:Parameter not set.
how to define this path variable for permanent usage?
please help
thanx for all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 03:33 AM
12-21-2004 03:33 AM
Re: variable path
You should export your variable:
export X=/home/kamal/test
Now it should work
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 03:34 AM
12-21-2004 03:34 AM
Re: variable path
Add the following line to your .profile file:
export x=/home/kamal/test
Then next time you log in it should be available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 04:02 AM
12-21-2004 04:02 AM
Re: variable path
i tryed it and now its working
but if i want to make this variable
global for all users
it mean i will type
export x=/home/kamal/test
in all users directories .profile??
is there any way ?
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 04:06 AM
12-21-2004 04:06 AM
Re: variable path
If so and if everyone is using ksh or sh for their shell then you can add that line in /etc/profile and it will be available to everyone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 04:17 AM
12-21-2004 04:17 AM
Re: variable path
for sh the syntax is
set x=/home/kamal/test;export x
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 04:23 AM
12-21-2004 04:23 AM
Re: variable path
Just doing
export x=whatever
will work just fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 04:35 AM
12-21-2004 04:35 AM
Re: variable path
you are right. I didn't expect sh on HP-UX to behave differently than on Tru64
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 04:50 AM
12-21-2004 04:50 AM
Re: variable path
it working now
thankx again
kamal