User defined variables are local to the current shell, and are defined by the user (as the name states). To set a user defined variable, the user would use the set command which has the following syntax for assigning a value to a variable:
% set MY_ADDRESSfirstname.lastname@example.org'' % echo ``E-mail me at $MY_ADDRESS'' E-mail me at email@example.com
To see a listing of all of the currently set variables (both local and global), the set command can be used with no arguments. For example, a typical session might give the following:
% set MY_ADDRESS firstname.lastname@example.org cdpath /usr/spool cwd /home/buchanan/book/cshell history 40 home /home/buchanan path (/bin /usr/bin /usr/local/bin usr/X11/bin .) prompt2 %m:%# shell /bin/csh user /buchanan
All of the lower cased variables are environmental variables that will
be covered shortly.
To remove a variable from use, the
unset command can be used.
unset command followed by a name (or wildcard expression)
will remove the variable(s).