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
тАО08-05-2006 01:06 AM
тАО08-05-2006 01:06 AM
Shell
WHAT ARE SHELL VARIABLES
- Tags:
- variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2006 01:39 AM
тАО08-05-2006 01:39 AM
Re: Shell
Strictly speaking, "shell variables" are memory storage areas. That is, the variable or parameter is available only to the shell in which it is declared. Starting a subshell or another process does not inherit the variable. The variable is a 'local' one.
"Environmental" variables are 'global' variables. That is, they are visible by your current shell and any process started by it. The shell PATH, PS1, IFS, and HOME variables are examples of environmental ones.
"Shell variables" would also include the $0, $1...$n positional parameters, representing your program name and the arguments passed to it, respectively.
Shell variables include the $? which is the return value from the last command run; $# which is the number of positional parameters; and the $! which is the pid of the last background process.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2006 01:59 AM
тАО08-05-2006 01:59 AM
Re: Shell
By the way, typing in all uppercase letters is considered to be shouting. It is generally regarded as rude. You should reserve its use for an occassional phrase for emphasis only, and then only rarely.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2006 08:48 AM
тАО08-06-2006 08:48 AM
Re: Shell
On a Linux box using standard "bash" shell, simply type "env" to see currently used shell variables.
Good lcuk.
Kodjo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2006 11:11 PM
тАО08-06-2006 11:11 PM
Re: Shell
Apart from using "env", you can also type "set" and you will see a listing of the environment variables that are set for the current session.
--
Atul