0% found this document useful (0 votes)
19 views5 pages

Shell Command Variable Management

The document discusses output redirection and the use of internal commands like 'help', 'which', and 'man' for obtaining details. It explains that variables are local by default and can be made available in subshells using the 'export' command. An example of exporting a variable is provided with 'export mynewvar=red'.

Uploaded by

Shanavas Hussain
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

Shell Command Variable Management

The document discusses output redirection and the use of internal commands like 'help', 'which', and 'man' for obtaining details. It explains that variables are local by default and can be made available in subshells using the 'export' command. An example of exporting a variable is provided with 'export mynewvar=red'.

Uploaded by

Shanavas Hussain
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Example of output redirection:

Use help to see the internal commands

Using which and man commands you can get details.


Variable by nature is local.

Every single command that you are going to run is starting a sub shell by itself. And if you
want your variables to be available, then you will use export

export mynewvar=red

You might also like