Variables – HP NonStop G-Series User Manual
Page 44

A .profile file resides in each user’s home directory and contains information that affects only
that individual user’s shell. The variables and user definitions in .profile are defined and
maintained by each user. These environment variables are often called “local variables,” “local
environment variables,” or “shell variables.”
lists the environment variables, except the localization environment variables, which are
described in the Open System Services Management and Operations Guide. For further information
and a complete list of environment variables, refer to the sh(1) and the environ(5) reference
pages either online or in the Open System Services Shell and Utilities Reference Manual.
Table 8 Variables
Description
Variable
Specifies the directories that the cd command will search to find the specified
argument to cd. If cd’s argument is null, or if it begins with a / (slash), . (dot), or
..
(dot dot), CDPATH is ignored.
CDPATH
Specifies the width of the edit window for the shell edit modes and for printing
select
lists.
COLUMNS
Specifies the default editor.
EDITOR
Specifies the pathname of the script executed when the shell is started. This variable
is often used to specify a file containing aliases and special paths used by the shell.
ENV
Specifies the value of the error of the most recently failed system call. The value of
ERRNO
is system-dependent and is used for debugging.
ERRNO
Specifies the default editor for the fc command. (The default value is /bin/ed.)
FCEDIT
Defines the search path for function definitions.
FPATH
Defines the pathname of the file used to store the command history.
HISTFILE
Defines the maximum number of previously entered commands that can be held by
the history file. (The default value is 128.)
HISTSIZE
Specifies the default value of the cd command. This variable cannot be changed
by the individual user.
HOME
Specifies internal field separators (usually spaces, tabs, and newlines) used to
separate command words that result from command and parameter substitution and
for separating words with the read command. (The default value is a single space.)
IFS
Returns the number of the current line being executed in a script or function.
LINENO
Defines the column width used for printing select lists.
LINES
Returns the Guardian logon name of the current user.
LOGNAME
Returns the working directory set by the last execution of the cd command.
OLDPWD
Returns the value of the last option argument processed by the getopts command.
OPTARG
Returns the index of the last option argument processed by the getopts command.
OPTIND
Specifies the directories and the directory order that your system uses to search for,
find, and execute commands. (The default value is /bin.)
PATH
Returns the process number of the parent of the current shell process.
PPID
Specifies the primary prompt string. (The default value is $pwd:.)
PS1
Specifies the secondary prompt string. (The default value is >.)
PS2
Specifies the prompt used within a select loop. (The default value is #?.)
PS3
Specifies the string (or character) that precedes each line in an execution trace. (The
default value is +.)
PS4
Specifies the current working directory.
PWD
44
The OSS Shell