Novell LINUX ENTERPRISE SERVER 11 - ADMINISTRATION Administration Manual page 62

Hide thumbs Also See for LINUX ENTERPRISE SERVER 11 - ADMINISTRATION:
Table of Contents

Advertisement

To remove a variable, use unset:
unset NAME
The following table contains some common environment variables which can be used
in you shell scripts:
Table 5.5
HOME
HOST
LANG
PATH
PS1
PS2
PWD
USER
5.5.1 Using Argument Variables
For example, if you have the script foo.sh you can execute it like this:
foo.sh "Tux Penguin" 2000
To access all the arguments which are passed to your script, you need positional param-
eters. These are $1 for the first argument, $2 for the second, and so on. You can have
up to nine parameters. To get the script name, use $0.
The following script foo.sh prints all arguments from 1 to 4:
48
Administration Guide
Useful Environment Variables
the home directory of the current user
the current host name
when a tool is localized, it uses the language from this envi-
ronment variable. English can also be set to C
the search path of the shell, a list of directories separated by
colon
specifies the normal prompt printed before each command
specifies the secondary prompt printed when you execute a
multi-line command
current working directory
the current user

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 11

Table of Contents