- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Where is PWD set?
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-16-2001 07:32 PM
08-16-2001 07:32 PM
Where is PWD set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 08:06 PM
08-16-2001 08:06 PM
Re: Where is PWD set?
It's in your environment as a shell variable. 'env' and 'set' show this variable.
echo $PWD
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 08:24 PM
08-16-2001 08:24 PM
Re: Where is PWD set?
$PWD is set in your standard shell. If you type $PWD it will show you your current directory, another way to see your current shell variables is to type 'env'. This will include $PWD
HTH
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:12 PM
08-16-2001 09:12 PM
Re: Where is PWD set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:17 PM
08-16-2001 09:17 PM
Re: Where is PWD set?
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:33 PM
08-16-2001 09:33 PM
Re: Where is PWD set?
1. You can create your own environment var by exporting the variables with the export command.
2. You can add environments to the shell by entering them in the ~/.profile file;)
My problem is creating my own PWD that acts as the environment var PWD. If you notice when you change a directory the environment var PWD changes as well. If you were to create MYPWD=$(pwd), when you change the directory it doesn't update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:42 PM
08-16-2001 09:42 PM
Re: Where is PWD set?
You can create any number of variables. I was talking exactly what you said. Only $PWD will change when you change the directory. You cannot create your own variable that behaves like this. There are a set of variables that are fixed. Like PWD, DISPLAY, TMOUT etc., So you can't really create a variable that can function like DISPLAY variable.
I want to rephrase my last message -
I am afraid, you may not be able to create your own environment variable like PWD.
Hope I am little bit clear now :-)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:43 PM
08-16-2001 09:43 PM
Re: Where is PWD set?
You can create any number of variables. I was talking exactly what you said. Only $PWD will change when you change the directory. You cannot create your own variable that behaves like this. There are a set of variables that are fixed. Like PWD, DISPLAY, TMOUT etc., So you can't really create a variable that can function like DISPLAY variable.
I want to rephrase my last message -
I am afraid, you may not be able to create your own environment variable like PWD.
Hope I am little bit clear now :-)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:44 PM
08-16-2001 09:44 PM
Re: Where is PWD set?
You can create any number of variables. I was talking exactly what you said. Only $PWD will change when you change the directory. You cannot create your own variable that behaves like this. There are a set of variables that are fixed. Like PWD, DISPLAY, TMOUT etc., So you can't really create a variable that can function like DISPLAY variable.
I want to rephrase my last message -
I am afraid, you may not be able to create your own environment variable like PWD.
Hope I am little bit clear now :-)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:44 PM
08-16-2001 09:44 PM
Re: Where is PWD set?
You can create any number of variables. I was talking exactly what you said. Only $PWD will change when you change the directory. You cannot create your own variable that behaves like this. There are a set of variables that are fixed. Like PWD, DISPLAY, TMOUT etc., So you can't really create a variable that can function like DISPLAY variable.
I want to rephrase my last message -
I am afraid, you may not be able to create your own environment variable like PWD.
Hope I am little bit clear now :-)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:44 PM
08-16-2001 09:44 PM
Re: Where is PWD set?
You can create any number of variables. I was talking exactly what you said. Only $PWD will change when you change the directory. You cannot create your own variable that behaves like this. There are a set of variables that are fixed. Like PWD, DISPLAY, TMOUT etc., So you can't really create a variable that can function like DISPLAY variable.
I want to rephrase my last message -
I am afraid, you may not be able to create your own environment variable like PWD.
Hope I am little bit clear now :-)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:45 PM
08-16-2001 09:45 PM
Re: Where is PWD set?
Have a look at the man pages for
sh-posix
ksh
sh
There is sufficient information there that should explain your question. Open the man pages and search for PWD.
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:47 PM
08-16-2001 09:47 PM
Re: Where is PWD set?
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2001 09:47 PM
08-16-2001 09:47 PM
Re: Where is PWD set?
-Sri