-->

Previous | Table of Contents | Next

Page 42

_p Turn on privileged mode. In this mode, the $ENV file is not processed, and shell functions are not inherited from the environment. This is enabled automatically on startup if the effective user (group) ID is not equal to the real user (group) ID. Turning this option off causes the effective user and group IDs to be set to the real user and group IDs.
_t Exit after reading and executing one command.
_u Treat unset variables as an error when performing parameter expansion. If expansion is attempted on an unset variable, the shell prints an error message, and, if not interactive, exits with a non_zero status.
_v Print shell input lines as they are read.
_x After expanding each simple command, bash displays the expanded value of PS4, followed by the command and its expanded arguments.
_l Save and restore the binding of name in a for name [in word] command. (See "Shell Grammar," earlier in this manual page.)
_d Disable the hashing of commands that are looked up for execution. Normally, commands are remembered in a hash table, and once found, do not have to be looked up again.
_C The effect is as if the shell command noclobber= had been executed. (See "Shell Variables.")
_H Enable ! style history substitution. This flag is on by default when the shell is interactive.
_P If set, do not follow symbolic links when performing commands such as cd that change the current directory. The physical directory is used instead.
If no arguments follow this flag, then the positional parameters are unset. Otherwise, the positional parameters are set to the args, even if some of them begin with a _.
_ Signal the end of options, cause all remaining args to be assigned to the positional parameters. The _x and _v options are turned off. If there are no args, the positional parameters remain unchanged.
The flags are off by default unless otherwise noted. Using + rather than _ causes these flags to be turned off. The flags can also be specified as options to an invocation of the shell. The current set of flags may be found in $_. After the option arguments are processed, the remaining n args are treated as values for the positional parameters and are assigned, in order, to $1, $2, ... $n. If no options or args are supplied, all shell variables are printed. The return status is always True unless an illegal option is encountered.
shift [n] The positional parameters from n+1 ... are renamed to .... Parameters represented by the numbers $# down to $#_n+1 are unset. If n is 0, no parameters are changed. If n is not given, it is assumed to be 1. n must be a non-negative number less than or equal to $#. If n is greater than $#, the positional parameters are not changed. The return status is greater than 0 if n is greater than or less than 0; otherwise 0.
suspend [_f] Suspend the execution of this shell until it receives a SIG-CONT signal. The _f option says not to complain if this is a login shell; just suspend anyway. The return status is

Page 43

0 unless the shell is a login shell and _f is not supplied, or if job control is not enabled.
test expr[expr] Return a status of 0 (True) or 1 (False) depending on the evaluation of the conditional expression expr. Expressions may be unary or binary. Unary expressions are often used to examine the status of a file. There are string operators and numeric comparison operators as well. Each operator and operand must be a separate argument. If file is of the form /dev/fd/n, then file descriptor n is checked.
_b file—True if file exists and is block special.
_c file—True if file exists and is character special.
_d file—True if file exists and is a directory.
_e file—True if file exists.
_f file—True if file exists and is a regular file.
_g file—True if file exists and is set-group-id.
_k file—True if file has its "sticky" bit set.
_L file—True if file exists and is a symbolic link.
_p file—True if file exists and is a named pipe.
_r file—True if file exists and is readable.
_s file—True if file exists and has a size greater than zero.
_S file—True if file exists and is a socket.
_t fd—True if fd is opened on a terminal.
_u file—True if file exists and its set-user-id bit is set.
_w file—True if file exists and is writable.
_x file—True if file exists and is executable.
_O file—True if file exists and is owned by the effective user ID.
_G file—True if file exists and is owned by the effective group ID.
file1 _nt file2—True if file1 is newer (according to modification date) than file2.
file1 _ot file2—True if file1 is older than file2.
file1 _ef file—True if file1 and file2 have the same device and inode numbers.
_z string—True if the length of string is zero.
-n string—True if the length of string is non_zero.
string1 = string2—True if the strings are equal.
string1 != string2—True if the strings are not equal.
! expr—True if expr is False.
expr1 _a expr2—True if both expr1 AND expr2 are True.
expr1 _o expr2—True if either expr1 OR expr2 is True.
arg1 OP arg2 OP is one of _eq, _ne, _lt, _le, _gt, or _ge. These arithmetic binary operators return True if arg1 is equal, not-equal, less-than, less-than-or-equal, greater-than, or greater-than-or-equal than arg2, respectively. Arg1 and arg2 may be positive integers, negative integers, or the special expression _l string, which evaluates to the length of string.
times Print the accumulated user and system times for the shell and for processes run from the shell. The return status is 0.
trap [_l][arg][sigspec] The command arg is to be read and executed when the shell receives signal(s) sigspec. If arg is absent or _, all specified signals are reset to their original values (the

Previous | Table of Contents | Next