Shell Programming - Environment Variables

Will automatically define a set of variables in the Shell program is started, it is the environment variable set of variables, all commands in the system can use these variable parameters.

1, if Shell environment variables defined in the parent, the child can also view the Shell.

(1) the parent sub Shell Shell:

 

 

 

 Implementation of exit Exit Shell:

 

 Inquire:

 

 2, the system variables are defined:

The user name is set to a variable, num and sex as a system variable:

 

 View variables set command:

 

 Enter the command to enter the sub bash Shell:

 

 After entering the sub Shell has been unable to see the custom variable name:

 

 3, environment variables view (special):

 

 4, access to variable values:

 

 5, delete variables:

 

 num variable can not inquire into.

Guess you like

Origin www.cnblogs.com/zhai1997/p/12064751.html