-->

Previous | Table of Contents | Next

Page 39

history [n] With no options, display the command history list with line numbers. Lines listed
history _rwan [filename] with a * have been modified. An argument of n lists only the last n lines. If a nonoption argument is supplied, it is used as the name of the history file; if not, the value of HISTFILE is used. Options, if supplied, have the following meanings:
_a Append the "new" history lines (history lines entered since the beginning of the current bash session) to the history file.
_n Read the history lines not already read from the history file into the current history list. These are lines appended to the history file since the beginning of the current bash session.
-r Read the contents of the history file and use them as the current history.
w_ Write the current history to the history file, overwriting the history file's contents.
The return value is 0 unless an illegal option is encountered or an error occurs while reading or writing the history file.
jobs [_lnp][jobspec ... ] The first form lists the active jobs. The _l option lists process IDs in addition to
jobs _x command [ args ... ] the normal information; the _p option lists only the process ID of the job's process group leader. The _n option displays only jobs that have changed status since last notified. If jobspec is given, output is restricted to information about that job. The return status is 0 unless an illegal option is encountered or an illegal jobspec is supplied.
If the _x option is supplied, jobs replaces any jobspec found in command or args with the corresponding process group ID, and executes command, passing it args, returning its exit status.
kill [-s sigspec | _sigspec] Send the signal named by sigspec to the processes named by pid or jobspec. sigspec
[pid | jobspec] ... is either a signal name such as SIGKILL or a signal number. If sigspec is a signal
kill _l [signum] name, the name is not case sensitive and may be given with or without the SIG prefix. If sigspec is not present, then SIGTERM is assumed. An argument of _l lists the signal names. If any arguments are supplied when _l is given, the names of the specified signals are listed, and the return status is 0. An argument of — disables option checking for the rest of the arguments. kill returns True if at least one signal was successfully sent, or False if an error occurs or an illegal option is encountered.
let arg [arg ...] Each arg is an arithmetic expression to be evaluated. (See "Arithmetic Evaluation.") If the last arg evaluates to 0, let returns 1; 0 is returned otherwise.
local [name[=value] ...] For each argument, create a local variable named name, and assign it value. When local is used within a function, it causes the variable name to have a visible scope restricted to that function and its children. With no operands, local writes a list of local variables to the standard output. It is an error to use local when not within a function. The return status is 0 unless local is used outside a function, or an illegal name is supplied.
logout Exit a login shell.
popd [+/_n] Removes entries from the directory stack. With no arguments, removes the top directory from the stack, and performs a cd to the new top directory.
+n Removes the nth entry counting from the left of the list shown by dirs, starting with zero. For example, popd +0 removes the first directory, popd +1 the second.
_n Removes the nth entry counting from the right of the list shown by dirs, starting with zero. For example, popd -0 removes the last directory, popd -1 the next to last.

Previous | Table of Contents | Next