- 論壇徽章:
- 1
|
另外還想問(wèn)下,的set +e、set -e、printf引號(hào)中的\r分別是意思?
蟲蟲2003 發(fā)表于 2011-03-02 23:40 ![]() 這個(gè)你看bash的幫助頁(yè)就知道了。
set [+abefhkmnptuvxBCEHPT] [+o option] [arg ...]
Without options, the name and value of each shell variable are
displayed in a format that can be reused as input for setting or
resetting the currently-set variables. Read-only variables can‐
not be reset. In posix mode, only shell variables are listed.
The output is sorted according to the current locale. When
options are specified, they set or unset shell attributes. Any
arguments remaining after option processing are treated as val‐
ues for the positional parameters and are assigned, in order, to
$1, $2, ... $n. Options, if specified, have the following
meanings:
-a Automatically mark variables and functions which are
modified or created for export to the environment of
subsequent commands.
-b Report the status of terminated background jobs immedi‐
ately, rather than before the next primary prompt. This
is effective only when job control is enabled.
-e Exit immediately if a pipeline (which may consist of a
single simple command), a subshell command enclosed in
parentheses, or one of the commands executed as part of
a command list enclosed by braces (see SHELL GRAMMAR
above) exits with a non-zero status. The shell does not
exit if the command that fails is part of the command |
|