Environment variables: Difference between revisions

Content added Content deleted
(add link to Delphi for pascal)
(→‎{{header|UNIX Shell}}: These things are Unix standard, not bash-specific. The env utility does not print to "the screen". Mention the export command.)
Line 491: Line 491:


=={{header|UNIX Shell}}==
=={{header|UNIX Shell}}==
In Bash, you can use the environment variable like other variables in Bash; for example to print it out, you can do
In the Unix Shell Language, environment variables are available as ordinary variables:
<lang bash>echo $HOME</lang>
<lang bash>echo $HOME</lang>
An ordinary variable can be marked as an environment variable with the <code>export</code> command:
In Bash, the "env" command will print out all the key=value pairs to the screen.
<lang bash>export VAR</lang>
Now child processes launched by the shell will have an environment variable called <code>VAR</code>.

The Unix command "env" will print out all of the environment variables as key=value pairs on standard output.


=={{header|Ursala}}==
=={{header|Ursala}}==