Download - Rich Simms
Transcript
CIS 90 - Lesson 12 Using Environment (exported) Variables • Environment variables are a special subset of the shell variables. • Environment variables are shell variables that have been exported. • The env command will display the current environment variables and their values. Using the export command with no arguments will also show all the environment variables. • The export command is used to make a shell variable into an environment variable. dog=benji; export dog or export dog=benji • The export -n command is used to make an environment variable back into a normal shell variable. E.g. export -n dog makes dog back into a regular shell variable. • Child processes are provided copies of the parent's environment variables. • Any changes made by the child will not affect the parent's copies. 91