CLI Variables

From FreekiWiki
Revision as of 13:23, 23 February 2008 by Rwlove (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Assignment and Dereferencing

To assign a value to an environment variable you simply type the variable name, '=', then the value. For example,


To get the value of the variable (i.e. dereference) you place a '$' before the variable name.

#echo $FOO
#echo $BAR


env  = Shows you the environment variables that are currently defined.
echo = Displays a line of text.


  1. What is the value of the "HOME" environment variable?
  2. How would you create an environment variable named GEEK that's contents are "FREE GEEK is the best!"?