????
Your IP : 3.135.205.248
��V�|%�1*�12</2$l2
�2�2�2�2�2�233 33=3O3f3}3�3�3�3�3 �34404H4(d4/�4;�4$�4:5Y5l5�5(�5'�5"�56#6@63^6�6 �6&�6&�6/7/C7s7�7.�7�7"�78+'8S8e8/~8�8�8�8"�8939D9b9~9"�9/�9�9�9:-&:T:j:�:�:�:�:�:�:;);)F;p;�;�;�;�;�;< <!?<a<w<,�<�< �<�<
=0=.H=w=0�=�=�=�=>>.>E>]>w>�>
�>�>�>&�>?4?/R?�?�?)�?�?�?&@3-@a@~@�@�@&�@�@�@�@
AA9+A#eA�A�A�A��AH�E�H�H
IFI`JoJJ�J �J �J��J�P�
�Pw[1�[m�[ ]�0]�^]a�fbT?f�h��lX_p+�uL�w�1y�y?�|�$�-�t=�����������O�w��f��^��X�g@����u�������v��
�|�����i�
���8�O�j���?���ذ����Ա ���$� 4�>�G�[� o�y�N���ϲJQ����,r�=��f��D�DS������$�P�x\������������2��������<��@�F��F�L`����Xt�����>���'�,�s9��Z�`3D���� �b�:"B"S"g"|"O�"*�#
$$,$E$5^$O�$B�%�'&B�+E@,�,
�,�,}�,4/XH/�/*�/
�/
�/�0��4J6�Y6�C7�;<
<$<5<G<%f<$�<'�<�<%�<=,=.F=u=�=!�=�=�=
>>'.>0V>�>9�>�>�>�>$?@?T?
e?s?&|?'�?3�?9�?9@6K@6�@��@.MA:|A3�A �A�A!B
0B3>BrB=�B-�B�B'C&EC*lC*�C)�C)�C%D%<D bD1�D#�D1�D&E&2E&YE5�E.�E�E�E!F!3F:UF�F�F �F0�F1G�LG��G#�H(�H$�H�H$I#*I'NIvIS~I.�IJ J6JLJ)cJ
�J�J�J�J�J,�J%*K,PK%}K�K.�K?�K+!LMLVLcL,xL�L#�L@�L
M,MIM-dM,�M'�M�M.N,1N&^N*�N0�N6�NPO(iO �O)�O�O�O"P?+PTkP�P�P
�P8�PV.Q&�Q'�Q4�Q R)RAR(NRwR�R�R�R�R"�RS5
SOCS�S�S�S �S�S5�ST6T
>T
IT+TT9�T;�T$�TUd9U$�U�U�U�U�UV 1VRVmV�VH�V�V�V WW")W+LWxW�W�W4�W
�WD�W?5X,uX�X�X2�X!Y""Y"EY0hY�Y�Y �Yo�Y@ZfSZ1�Z/�Z)[-F[3t[�[&�[2�[5\,R\
\
�\1�\I�\4].F]>u](�],�],
^07^)h^N�^ �^�^ �^"_;_W_q_~_&�_=�_�_#`/`'F`n`�`�`,�`)�`a$6a[aqa}a�a"�a6�a�abQ7b*�b�b�b%�b.c-=c7kc6�c2�c1
d*?d,jd,�d;�d#e$e,eBe#be�e6�e�e�e*f"-fPf6pf �f�f-�f-�f#gAg'Qg'yg�g�g��g#�i�iE�i"j(jAjWj]juj!�j�j�j
�j
�j�jkk:kQkpk�k$�k�k�k�k �k#l);l2el"�l<�l�lm,m%Fm"lm�m�m�m�m5�m/n+@n(ln%�n.�n.�no/o+Eoqo$�o�o+�o�o p(%pNp!jp�p"�p�p�p!�pq.qBq*_q�q�q�q&�q�qrr+rFrWrqr�r�r�r"�r�r
s's;sOsfszs�s�s�s�s.t2tFtatxt'�t)�t�t+�t"u9uMuauru�u�u�u�u�u
�uvv#<v`vtv.�v�v�v�v"w
%w"0w,Sw�w�w�w
�w�w�wxx)xHx1]x �x�x�x�x%�x�|�~�~�~s�~A�W� m�w���
��?��߅H ��D�(K��t����$��{ܔ?X�2��˛��£˨5��������� c�
m�
{�u�����l�YQ����\2�������~�Gf����`�����������
���������3�@��M��5�P�Ab����{�������������
� ��+�8� ?�cI�q�������9��D�t\�����t���}��Jz]� #-K�R1y@���[��K� N� L<!��"ca$ �% �%3�%!
)�/,�3�5��7P�F��F�L�L��L �M��M RQ\QrQ�Q
�QP�Q*S 0S:SWSqSK�Sb�SE:Ur�UL�[L@\�\�\�\��\K_X]_�_m�_B`Q`�``w�d_f�ofLNg�k�k
�k�k�kl!l$>l!cl�l'�l�l�l0�l)m?m2Xm�m�m
�m�m�m-n0n<On�n�n�n�n�n�n�no)'o.Qo1�o9�o�o6p6<p�sp+q4Aq,vq �q#�q#�q�q;rDrO]r,�r4�r8s0Hs$ys$�s!�s!�s(t(0t Yt.zt1�t.�t'
u 2u'Su3{u-�u�u�u v+%v8Qv�v"�v"�v-�v=w�\w��w�x*�x�xy"y Ay$by�yV�y0�yz4zDzTz1kz�z�z�z�z�z/{ 2{$S{ x{�{)�{<�{.|A|
J|U|-d|�|!�|S�|}-}I}=_}-�}G�}~31~0e~*�~%�~.�~54L�+�,���!!�BC�`�����9�LM�&��!��-��1�G�-W�������Ăڂ3�$�?8�vx����
$�2�/E�u���
����,��<�3�#S�w�h�����
7�
B�%M�#s�����̆�`��V�f�����'��ʇ"���8&�_�?l�?��2��3�1@�,r���&��2��&� D��N�ϊj�2P�3��-��(�1�@�-P�5~�8��4�"�
)�34�Qh�?��/��?*�,j�1��0Ɏ5��&0�OW� ����"�� ���<�I�!V�;x���А�-
� 8�Y�q�$��'��ޑ*��(�;�L�`�)m�6�� Β!�T�+f��� ��(̓1��0'�5X�5��0Ĕ0��'&�)N�)x�5��$ؕ���!�<�\�1x���ʖ-ٖ$�!,�.N� }���6��6Η�%�'7�(_� ����Q+����|F���%&C<Y��_#��5��{o�b0n��lx�$/?O� ="�� !�H>���f��1�Pg�*�
vh�0;�LP���u'N�6M��rT?�`�\�:��>�7N�k�X<���*���BWmYb6�R"��T6�&>EC~
�%�B�`'�}�9�K��(�IfS.@m3���@ ����$FM�:
5��n��x�����?�[z �4
�����@�G�!QQ����S!���� ���L#J�B��^�WKP���;U%(����^/�H�y��Tu��0�Z��2�t��p�����#,RH�Z.4�,dU�1V{A��i\�FI���l$�-�8��k��Ipc+y���V�G���3:�e���J���������g��A��D�G"v�5<h8qt���,�NOj;r��_��1�7���s�9�J��ww�)�V���
�D���c]���.U)�Cs/�����2��i}��4*��+A�e] �zd��=j����q-�a[8�K���'&��7���3�����X��L�9�Eo
(E�D���a~��O����S-�|���M=����)�R2timed out waiting for input: auto-logout
-%s or -o option
-ilrsD or -c command or -O shopt_option (invocation only)
malloc: %s:%d: assertion botched
(wd: %s) (core dumped) line $%s: cannot assign in this way%c%c: invalid option%d: invalid file descriptor: %s%s can be invoked via %s has null exportstr%s is %s
%s is a function
%s is a shell builtin
%s is a shell keyword
%s is a special shell builtin
%s is aliased to `%s'
%s is hashed (%s)
%s is not bound to any keys.
%s out of range%s%s%s: %s (error token is "%s")%s: %s%s: %s out of range%s: %s: bad interpreter%s: %s: cannot open as FILE%s: %s: compatibility value out of range%s: %s: invalid value for trace file descriptor%s: %s: must use subscript when assigning associative array%s: %s:%d: cannot allocate %lu bytes%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)%s: Is a directory%s: ambiguous job spec%s: ambiguous redirect%s: arguments must be process or job IDs%s: assigning integer to name reference%s: bad network path specification%s: bad substitution%s: binary operator expected%s: cannot allocate %lu bytes%s: cannot allocate %lu bytes (%lu bytes allocated)%s: cannot assign%s: cannot assign fd to variable%s: cannot assign list to array member%s: cannot assign to non-numeric index%s: cannot convert associative to indexed array%s: cannot convert indexed to associative array%s: cannot create: %s%s: cannot delete: %s%s: cannot destroy array variables in this way%s: cannot execute binary file%s: cannot execute binary file: %s%s: cannot execute: %s%s: cannot execute: required file not found%s: cannot export%s: cannot get limit: %s%s: cannot inherit value from incompatible type%s: cannot modify limit: %s%s: cannot open temp file: %s%s: cannot open: %s%s: cannot overwrite existing file%s: cannot read: %s%s: cannot unset%s: cannot unset: readonly %s%s: circular name reference%s: command not found%s: dynamic builtin already loaded%s: error retrieving current directory: %s: %s
%s: expression error
%s: file is too large%s: file not found%s: first non-whitespace character is not `"'%s: hash table empty
%s: history expansion failed%s: host unknown%s: illegal option -- %c
%s: inlib failed%s: integer expression expected%s: invalid action name%s: invalid argument%s: invalid array origin%s: invalid callback quantum%s: invalid file descriptor specification%s: invalid indirect expansion%s: invalid limit argument%s: invalid line count%s: invalid option%s: invalid option name%s: invalid service%s: invalid shell option name%s: invalid signal specification%s: invalid timeout specification%s: invalid timestamp%s: invalid variable name%s: invalid variable name for name reference%s: is a directory%s: job %d already in background%s: job has terminated%s: line %d: %s: maximum function nesting level exceeded (%d)%s: maximum source nesting level exceeded (%d)%s: missing colon separator%s: nameref variable self references not allowed%s: no completion specification%s: no current jobs%s: no job control%s: no such job%s: not a function%s: not a regular file%s: not a shell builtin%s: not an array variable%s: not an indexed array%s: not dynamically loaded%s: not found%s: numeric argument required%s: option requires an argument%s: option requires an argument -- %c
%s: parameter not set%s: parameter null or not set%s: quoted compound array assignment deprecated%s: readonly function%s: readonly variable%s: reference variable cannot be an array%s: removing nameref attribute%s: restricted%s: restricted: cannot redirect output%s: restricted: cannot specify `/' in command names%s: substring expression < 0%s: unary operator expected%s: unbound variable%s: usage: %s: variable may not be assigned value'
(( expression ))(core dumped) (wd now: %s)
. filename [arguments]/dev/(tcp|udp)/host/port not supported without networking/tmp must be a valid directory name<no current directory>ABORT instructionAborting...Add directories to stack.
Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories.
Options:
-n Suppresses the normal change of directory when adding
directories to the stack, so only the stack is manipulated.
Arguments:
+N Rotates the stack so that the Nth directory (counting
from the left of the list shown by `dirs', starting with
zero) is at the top.
-N Rotates the stack so that the Nth directory (counting
from the right of the list shown by `dirs', starting with
zero) is at the top.
dir Adds DIR to the directory stack at the top, making it the
new current working directory.
The `dirs' builtin displays the directory stack.
Exit Status:
Returns success unless an invalid argument is supplied or the directory
change fails.Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories.
Options:
-n Suppresses the normal change of directory when adding
directories to the stack, so only the stack is manipulated.
Arguments:
+N Rotates the stack so that the Nth directory (counting
from the left of the list shown by `dirs', starting with
zero) is at the top.
-N Rotates the stack so that the Nth directory (counting
from the right of the list shown by `dirs', starting with
zero) is at the top.
dir Adds DIR to the directory stack at the top, making it the
new current working directory.
The `dirs' builtin displays the directory stack.Alarm (profile)Alarm (virtual)Alarm clockArithmetic for loop.
Equivalent to
(( EXP1 ))
while (( EXP2 )); do
COMMANDS
(( EXP3 ))
done
EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is
omitted, it behaves as if it evaluates to 1.
Exit Status:
Returns the status of the last command executed.BPT trace/trapBad system callBogus signalBroken pipeBus errorCPU limitChange the shell working directory.
Change the current directory to DIR. The default DIR is the value of the
HOME shell variable.
The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with a slash (/), then CDPATH is not used.
If the directory is not found, and the shell option `cdable_vars' is set,
the word is assumed to be a variable name. If that variable has a value,
its value is used for DIR.
Options:
-L force symbolic links to be followed: resolve symbolic
links in DIR after processing instances of `..'
-P use the physical directory structure without following
symbolic links: resolve symbolic links in DIR before
processing instances of `..'
-e if the -P option is supplied, and the current working
directory cannot be determined successfully, exit with
a non-zero status
-@ on systems that support it, present a file with extended
attributes as a directory containing the file attributes
The default is to follow symbolic links, as if `-L' were specified.
`..' is processed by removing the immediately previous pathname component
back to a slash or the beginning of DIR.
Exit Status:
Returns 0 if the directory is changed, and if $PWD is set successfully when
-P is used; non-zero otherwise.Child death or stopCommon shell variable names and usage.
BASH_VERSION Version information for this Bash.
CDPATH A colon-separated list of directories to search
for directories given as arguments to `cd'.
GLOBIGNORE A colon-separated list of patterns describing filenames to
be ignored by pathname expansion.
HISTFILE The name of the file where your command history is stored.
HISTFILESIZE The maximum number of lines this file can contain.
HISTSIZE The maximum number of history lines that a running
shell can access.
HOME The complete pathname to your login directory.
HOSTNAME The name of the current host.
HOSTTYPE The type of CPU this version of Bash is running under.
IGNOREEOF Controls the action of the shell on receipt of an EOF
character as the sole input. If set, then the value
of it is the number of EOF characters that can be seen
in a row on an empty line before the shell will exit
(default 10). When unset, EOF signifies the end of input.
MACHTYPE A string describing the current system Bash is running on.
MAILCHECK How often, in seconds, Bash checks for new mail.
MAILPATH A colon-separated list of filenames which Bash checks
for new mail.
OSTYPE The version of Unix this version of Bash is running on.
PATH A colon-separated list of directories to search when
looking for commands.
PROMPT_COMMAND A command to be executed before the printing of each
primary prompt.
PS1 The primary prompt string.
PS2 The secondary prompt string.
PWD The full pathname of the current directory.
SHELLOPTS A colon-separated list of enabled shell options.
TERM The name of the current terminal type.
TIMEFORMAT The output format for timing statistics displayed by the
`time' reserved word.
auto_resume Non-null means a command word appearing on a line by
itself is first looked for in the list of currently
stopped jobs. If found there, that job is foregrounded.
A value of `exact' means that the command word must
exactly match a command in the list of stopped jobs. A
value of `substring' means that the command word must
match a substring of the job. Any other value means that
the command must be a prefix of a stopped job.
histchars Characters controlling history expansion and quick
substitution. The first character is the history
substitution character, usually `!'. The second is
the `quick substitution' character, usually `^'. The
third is the `history comment' character, usually `#'.
HISTIGNORE A colon-separated list of patterns used to decide which
commands should be saved on the history list.
ContinueCopyright (C) 2022 Free Software Foundation, Inc.Create a coprocess named NAME.
Execute COMMAND asynchronously, with the standard output and standard
input of the command connected via a pipe to file descriptors assigned
to indices 0 and 1 of an array variable NAME in the executing shell.
The default NAME is "COPROC".
Exit Status:
The coproc command returns an exit status of 0.DEBUG warning: Define local variables.
Create a local variable called NAME, and give it VALUE. OPTION can
be any option accepted by `declare'.
Local variables can only be used within a function; they are visible
only to the function where they are defined and its children.
Exit Status:
Returns success unless an invalid option is supplied, a variable
assignment error occurs, or the shell is not executing a function.Define or display aliases.
Without arguments, `alias' prints the list of aliases in the reusable
form `alias NAME=VALUE' on standard output.
Otherwise, an alias is defined for each NAME whose VALUE is given.
A trailing space in VALUE causes the next word to be checked for
alias substitution when the alias is expanded.
Options:
-p print all defined aliases in a reusable format
Exit Status:
alias returns true unless a NAME is supplied for which no alias has been
defined.Define shell function.
Create a shell function named NAME. When invoked as a simple command,
NAME runs COMMANDs in the calling shell's context. When NAME is invoked,
the arguments are passed to the function as $1...$n, and the function's
name is in $FUNCNAME.
Exit Status:
Returns success unless NAME is readonly.Display directory stack.
Display the list of currently remembered directories. Directories
find their way onto the list with the `pushd' command; you can get
back up through the list with the `popd' command.
Options:
-c clear the directory stack by deleting all of the elements
-l do not print tilde-prefixed versions of directories relative
to your home directory
-p print the directory stack with one entry per line
-v print the directory stack with one entry per line prefixed
with its position in the stack
Arguments:
+N Displays the Nth entry counting from the left of the list
shown by dirs when invoked without options, starting with
zero.
-N Displays the Nth entry counting from the right of the list
shown by dirs when invoked without options, starting with
zero.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.Display information about builtin commands.
Displays brief summaries of builtin commands. If PATTERN is
specified, gives detailed help on all commands matching PATTERN,
otherwise the list of help topics is printed.
Options:
-d output short description for each topic
-m display usage in pseudo-manpage format
-s output only a short usage synopsis for each topic matching
PATTERN
Arguments:
PATTERN Pattern specifying a help topic
Exit Status:
Returns success unless PATTERN is not found or an invalid option is given.Display information about command type.
For each NAME, indicate how it would be interpreted if used as a
command name.
Options:
-a display all locations containing an executable named NAME;
includes aliases, builtins, and functions, if and only if
the `-p' option is not also used
-f suppress shell function lookup
-P force a PATH search for each NAME, even if it is an alias,
builtin, or function, and returns the name of the disk file
that would be executed
-p returns either the name of the disk file that would be executed,
or nothing if `type -t NAME' would not return `file'
-t output a single word which is one of `alias', `keyword',
`function', `builtin', `file' or `', if NAME is an alias,
shell reserved word, shell function, shell builtin, disk file,
or not found, respectively
Arguments:
NAME Command name to be interpreted.
Exit Status:
Returns success if all of the NAMEs are found; fails if any are not found.Display or execute commands from the history list.
fc is used to list or edit and re-execute commands from the history list.
FIRST and LAST can be numbers specifying the range, or FIRST can be a
string, which means the most recent command beginning with that
string.
Options:
-e ENAME select which editor to use. Default is FCEDIT, then EDITOR,
then vi
-l list lines instead of editing
-n omit line numbers when listing
-r reverse the order of the lines (newest listed first)
With the `fc -s [pat=rep ...] [command]' format, COMMAND is
re-executed after the substitution OLD=NEW is performed.
A useful alias to use with this is r='fc -s', so that typing `r cc'
runs the last command beginning with `cc' and typing `r' re-executes
the last command.
Exit Status:
Returns success or status of executed command; non-zero if an error occurs.Display or manipulate the history list.
Display the history list with line numbers, prefixing each modified
entry with a `*'. An argument of N lists only the last N entries.
Options:
-c clear the history list by deleting all of the entries
-d offset delete the history entry at position OFFSET. Negative
offsets count back from the end of the history list
-a append history lines from this session to the history file
-n read all history lines not already read from the history file
and append them to the history list
-r read the history file and append the contents to the history
list
-w write the current history to the history file
-p perform history expansion on each ARG and display the result
without storing it in the history list
-s append the ARGs to the history list as a single entry
If FILENAME is given, it is used as the history file. Otherwise,
if HISTFILE has a value, that is used, else ~/.bash_history.
If the HISTTIMEFORMAT variable is set and not null, its value is used
as a format string for strftime(3) to print the time stamp associated
with each displayed history entry. No time stamps are printed otherwise.
Exit Status:
Returns success unless an invalid option is given or an error occurs.Display or set file mode mask.
Sets the user file-creation mask to MODE. If MODE is omitted, prints
the current value of the mask.
If MODE begins with a digit, it is interpreted as an octal number;
otherwise it is a symbolic mode string like that accepted by chmod(1).
Options:
-p if MODE is omitted, output in a form that may be reused as input
-S makes the output symbolic; otherwise an octal number is output
Exit Status:
Returns success unless MODE is invalid or an invalid option is given.Display possible completions depending on the options.
Intended to be used from within a shell function generating possible
completions. If the optional WORD argument is supplied, matches against
WORD are generated.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.Display process times.
Prints the accumulated user and system times for the shell and all of its
child processes.
Exit Status:
Always succeeds.Display status of jobs.
Lists the active jobs. JOBSPEC restricts output to that job.
Without options, the status of all active jobs is displayed.
Options:
-l lists process IDs in addition to the normal information
-n lists only processes that have changed status since the last
notification
-p lists process IDs only
-r restrict output to running jobs
-s restrict output to stopped jobs
If -x is supplied, COMMAND is run after all job specifications that
appear in ARGS have been replaced with the process ID of that job's
process group leader.
Exit Status:
Returns success unless an invalid option is given or an error occurs.
If -x is used, returns the exit status of COMMAND.Display the list of currently remembered directories. Directories
find their way onto the list with the `pushd' command; you can get
back up through the list with the `popd' command.
Options:
-c clear the directory stack by deleting all of the elements
-l do not print tilde-prefixed versions of directories relative
to your home directory
-p print the directory stack with one entry per line
-v print the directory stack with one entry per line prefixed
with its position in the stack
Arguments:
+N Displays the Nth entry counting from the left of the list shown by
dirs when invoked without options, starting with zero.
-N Displays the Nth entry counting from the right of the list shown by
dirs when invoked without options, starting with zero.DoneDone(%d)EMT instructionEnable and disable shell builtins.
Enables and disables builtin shell commands. Disabling allows you to
execute a disk command which has the same name as a shell builtin
without using a full pathname.
Options:
-a print a list of builtins showing whether or not each is enabled
-n disable each NAME or display a list of disabled builtins
-p print the list of builtins in a reusable format
-s print only the names of Posix `special' builtins
Options controlling dynamic loading:
-f Load builtin NAME from shared object FILENAME
-d Remove a builtin loaded with -f
Without options, each NAME is enabled.
To use the `test' found in $PATH instead of the shell builtin
version, type `enable -n test'.
Exit Status:
Returns success unless NAME is not a shell builtin or an error occurs.Evaluate arithmetic expression.
The EXPRESSION is evaluated according to the rules for arithmetic
evaluation. Equivalent to `let "EXPRESSION"'.
Exit Status:
Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise.Evaluate arithmetic expressions.
Evaluate each ARG as an arithmetic expression. Evaluation is done in
fixed-width integers with no check for overflow, though division by 0
is trapped and flagged as an error. The following list of operators is
grouped into levels of equal-precedence operators. The levels are listed
in order of decreasing precedence.
id++, id-- variable post-increment, post-decrement
++id, --id variable pre-increment, pre-decrement
-, + unary minus, plus
!, ~ logical and bitwise negation
** exponentiation
*, /, % multiplication, division, remainder
+, - addition, subtraction
<<, >> left and right bitwise shifts
<=, >=, <, > comparison
==, != equality, inequality
& bitwise AND
^ bitwise XOR
| bitwise OR
&& logical AND
|| logical OR
expr ? expr : expr
conditional operator
=, *=, /=, %=,
+=, -=, <<=, >>=,
&=, ^=, |= assignment
Shell variables are allowed as operands. The name of the variable
is replaced by its value (coerced to a fixed-width integer) within
an expression. The variable need not have its integer attribute
turned on to be used in an expression.
Operators are evaluated in order of precedence. Sub-expressions in
parentheses are evaluated first and may override the precedence
rules above.
Exit Status:
If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.Evaluate conditional expression.
Exits with a status of 0 (true) or 1 (false) depending on
the evaluation of 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.
The behavior of test depends on the number of arguments. Read the
bash manual page for the complete specification.
File operators:
-a FILE True if file exists.
-b FILE True if file is block special.
-c FILE True if file is character special.
-d FILE True if file 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 is set-group-id.
-h FILE True if file is a symbolic link.
-L FILE True if file is a symbolic link.
-k FILE True if file has its `sticky' bit set.
-p FILE True if file is a named pipe.
-r FILE True if file is readable by you.
-s FILE True if file exists and is not empty.
-S FILE True if file is a socket.
-t FD True if FD is opened on a terminal.
-u FILE True if the file is set-user-id.
-w FILE True if the file is writable by you.
-x FILE True if the file is executable by you.
-O FILE True if the file is effectively owned by you.
-G FILE True if the file is effectively owned by your group.
-N FILE True if the file has been modified since it was last read.
FILE1 -nt FILE2 True if file1 is newer than file2 (according to
modification date).
FILE1 -ot FILE2 True if file1 is older than file2.
FILE1 -ef FILE2 True if file1 is a hard link to file2.
String operators:
-z STRING True if string is empty.
-n STRING
STRING True if string is not empty.
STRING1 = STRING2
True if the strings are equal.
STRING1 != STRING2
True if the strings are not equal.
STRING1 < STRING2
True if STRING1 sorts before STRING2 lexicographically.
STRING1 > STRING2
True if STRING1 sorts after STRING2 lexicographically.
Other operators:
-o OPTION True if the shell option OPTION is enabled.
-v VAR True if the shell variable VAR is set.
-R VAR True if the shell variable VAR is set and is a name
reference.
! 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 Arithmetic tests. OP is one of -eq, -ne,
-lt, -le, -gt, or -ge.
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.
Exit Status:
Returns success if EXPR evaluates to true; fails if EXPR evaluates to
false or an invalid argument is given.Evaluate conditional expression.
This is a synonym for the "test" builtin, but the last argument must
be a literal `]', to match the opening `['.Execute a simple command or display information about commands.
Runs COMMAND with ARGS suppressing shell function lookup, or display
information about the specified COMMANDs. Can be used to invoke commands
on disk when a function with the same name exists.
Options:
-p use a default value for PATH that is guaranteed to find all of
the standard utilities
-v print a description of COMMAND similar to the `type' builtin
-V print a more verbose description of each COMMAND
Exit Status:
Returns exit status of COMMAND, or failure if COMMAND is not found.Execute arguments as a shell command.
Combine ARGs into a single string, use the result as input to the shell,
and execute the resulting commands.
Exit Status:
Returns exit status of command or success if command is null.Execute commands as long as a test does not succeed.
Expand and execute COMMANDS-2 as long as the final command in COMMANDS has
an exit status which is not zero.
Exit Status:
Returns the status of the last command executed.Execute commands as long as a test succeeds.
Expand and execute COMMANDS-2 as long as the final command in COMMANDS has
an exit status of zero.
Exit Status:
Returns the status of the last command executed.Execute commands based on conditional.
The `if COMMANDS' list is executed. If its exit status is zero, then the
`then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list is
executed in turn, and if its exit status is zero, the corresponding
`then COMMANDS' list is executed and the if command completes. Otherwise,
the `else COMMANDS' list is executed, if present. The exit status of the
entire construct is the exit status of the last command executed, or zero
if no condition tested true.
Exit Status:
Returns the status of the last command executed.Execute commands based on pattern matching.
Selectively execute COMMANDS based upon WORD matching PATTERN. The
`|' is used to separate multiple patterns.
Exit Status:
Returns the status of the last command executed.Execute commands for each member in a list.
The `for' loop executes a sequence of commands for each member in a
list of items. If `in WORDS ...;' is not present, then `in "$@"' is
assumed. For each element in WORDS, NAME is set to that element, and
the COMMANDS are executed.
Exit Status:
Returns the status of the last command executed.Execute commands from a file in the current shell.
Read and execute commands from FILENAME in the current shell. The
entries in $PATH are used to find the directory containing FILENAME.
If any ARGUMENTS are supplied, they become the positional parameters
when FILENAME is executed.
Exit Status:
Returns the status of the last command executed in FILENAME; fails if
FILENAME cannot be read.Execute conditional command.
Returns a status of 0 or 1 depending on the evaluation of the conditional
expression EXPRESSION. Expressions are composed of the same primaries used
by the `test' builtin, and may be combined using the following operators:
( EXPRESSION ) Returns the value of EXPRESSION
! EXPRESSION True if EXPRESSION is false; else false
EXPR1 && EXPR2 True if both EXPR1 and EXPR2 are true; else false
EXPR1 || EXPR2 True if either EXPR1 or EXPR2 is true; else false
When the `==' and `!=' operators are used, the string to the right of
the operator is used as a pattern and pattern matching is performed.
When the `=~' operator is used, the string to the right of the operator
is matched as a regular expression.
The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to
determine the expression's value.
Exit Status:
0 or 1 depending on value of EXPRESSION.Execute shell builtins.
Execute SHELL-BUILTIN with arguments ARGs without performing command
lookup. This is useful when you wish to reimplement a shell builtin
as a shell function, but need to execute the builtin within the function.
Exit Status:
Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is
not a shell builtin.Exit %dExit a login shell.
Exits a login shell with exit status N. Returns an error if not executed
in a login shell.Exit for, while, or until loops.
Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing
loops.
Exit Status:
The exit status is 0 unless N is not greater than or equal to 1.Exit the shell.
Exits the shell with a status of N. If N is omitted, the exit status
is that of the last command executed.File limitFloating point exceptionFormats and prints ARGUMENTS under control of the FORMAT.
Options:
-v var assign the output to shell variable VAR rather than
display it on the standard output
FORMAT is a character string which contains three types of objects: plain
characters, which are simply copied to standard output; character escape
sequences, which are converted and copied to the standard output; and
format specifications, each of which causes printing of the next successive
argument.
In addition to the standard format specifications described in printf(1),
printf interprets:
%b expand backslash escape sequences in the corresponding argument
%q quote the argument in a way that can be reused as shell input
%Q like %q, but apply any precision to the unquoted argument before
quoting
%(fmt)T output the date-time string resulting from using FMT as a format
string for strftime(3)
The format is re-used as necessary to consume all of the arguments. If
there are fewer arguments than the format requires, extra format
specifications behave as if a zero value or null string, as appropriate,
had been supplied.
Exit Status:
Returns success unless an invalid option is given or a write or assignment
error occurs.GNU bash, version %s (%s)
GNU bash, version %s-(%s)
GNU long options:
General help using GNU software: <http://www.gnu.org/gethelp/>
Group commands as a unit.
Run a set of commands in a group. This is one way to redirect an
entire set of commands.
Exit Status:
Returns the status of the last command executed.HFT input data pendingHFT monitor mode grantedHFT monitor mode retractedHFT sound sequence has completedHOME not setHangupI have no name!I/O readyINFORM: Illegal instructionInformation requestInterruptKilledLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
Mark shell variables as unchangeable.
Mark each NAME as read-only; the values of these NAMEs may not be
changed by subsequent assignment. If VALUE is supplied, assign VALUE
before marking as read-only.
Options:
-a refer to indexed array variables
-A refer to associative array variables
-f refer to shell functions
-p display a list of all readonly variables or functions,
depending on whether or not the -f option is given
An argument of `--' disables further option processing.
Exit Status:
Returns success unless an invalid option is given or NAME is invalid.Modify or display completion options.
Modify the completion options for each NAME, or, if no NAMEs are supplied,
the completion currently being executed. If no OPTIONs are given, print
the completion options for each NAME or the current completion specification.
Options:
-o option Set completion option OPTION for each NAME
-D Change options for the "default" command completion
-E Change options for the "empty" command completion
-I Change options for completion on the initial word
Using `+o' instead of `-o' turns off the specified option.
Arguments:
Each NAME refers to a command for which a completion specification must
have previously been defined using the `complete' builtin. If no NAMEs
are supplied, compopt must be called by a function currently generating
completions, and the options for that currently-executing completion
generator are modified.
Exit Status:
Returns success unless an invalid option is supplied or NAME does not
have a completion specification defined.Modify shell resource limits.
Provides control over the resources available to the shell and processes
it creates, on systems that allow such control.
Options:
-S use the `soft' resource limit
-H use the `hard' resource limit
-a all current limits are reported
-b the socket buffer size
-c the maximum size of core files created
-d the maximum size of a process's data segment
-e the maximum scheduling priority (`nice')
-f the maximum size of files written by the shell and its children
-i the maximum number of pending signals
-k the maximum number of kqueues allocated for this process
-l the maximum size a process may lock into memory
-m the maximum resident set size
-n the maximum number of open file descriptors
-p the pipe buffer size
-q the maximum number of bytes in POSIX message queues
-r the maximum real-time scheduling priority
-s the maximum stack size
-t the maximum amount of cpu time in seconds
-u the maximum number of user processes
-v the size of virtual memory
-x the maximum number of file locks
-P the maximum number of pseudoterminals
-R the maximum time a real-time process can run before blocking
-T the maximum number of threads
Not all options are available on all platforms.
If LIMIT is given, it is the new value of the specified resource; the
special LIMIT values `soft', `hard', and `unlimited' stand for the
current soft limit, the current hard limit, and no limit, respectively.
Otherwise, the current value of the specified resource is printed. If
no option is given, then -f is assumed.
Values are in 1024-byte increments, except for -t, which is in seconds,
-p, which is in increments of 512 bytes, and -u, which is an unscaled
number of processes.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.Move job to the foreground.
Place the job identified by JOB_SPEC in the foreground, making it the
current job. If JOB_SPEC is not present, the shell's notion of the
current job is used.
Exit Status:
Status of command placed in foreground, or failure if an error occurs.Move jobs to the background.
Place the jobs identified by each JOB_SPEC in the background, as if they
had been started with `&'. If JOB_SPEC is not present, the shell's notion
of the current job is used.
Exit Status:
Returns success unless job control is not enabled or an error occurs.Null command.
No effect; the command does nothing.
Exit Status:
Always succeeds.OLDPWD not setParse option arguments.
Getopts is used by shell procedures to parse positional parameters
as options.
OPTSTRING contains the option letters to be recognized; if a letter
is followed by a colon, the option is expected to have an argument,
which should be separated from it by white space.
Each time it is invoked, getopts will place the next option in the
shell variable $name, initializing name if it does not exist, and
the index of the next argument to be processed into the shell
variable OPTIND. OPTIND is initialized to 1 each time the shell or
a shell script is invoked. When an option requires an argument,
getopts places that argument into the shell variable OPTARG.
getopts reports errors in one of two ways. If the first character
of OPTSTRING is a colon, getopts uses silent error reporting. In
this mode, no error messages are printed. If an invalid option is
seen, getopts places the option character found into OPTARG. If a
required argument is not found, getopts places a ':' into NAME and
sets OPTARG to the option character found. If getopts is not in
silent mode, and an invalid option is seen, getopts places '?' into
NAME and unsets OPTARG. If a required argument is not found, a '?'
is placed in NAME, OPTARG is unset, and a diagnostic message is
printed.
If the shell variable OPTERR has the value 0, getopts disables the
printing of error messages, even if the first character of
OPTSTRING is not a colon. OPTERR has the value 1 by default.
Getopts normally parses the positional parameters, but if arguments
are supplied as ARG values, they are parsed instead.
Exit Status:
Returns success if an option is found; fails if the end of options is
encountered or an error occurs.Print the name of the current working directory.
Options:
-L print the value of $PWD if it names the current working
directory
-P print the physical directory, without any symbolic links
By default, `pwd' behaves as if `-L' were specified.
Exit Status:
Returns 0 unless an invalid option is given or the current directory
cannot be read.QuitRead a line from the standard input and split it into fields.
Reads a single line from the standard input, or from file descriptor FD
if the -u option is supplied. The line is split into fields as with word
splitting, and the first word is assigned to the first NAME, the second
word to the second NAME, and so on, with any leftover words assigned to
the last NAME. Only the characters found in $IFS are recognized as word
delimiters. By default, the backslash character escapes delimiter characters
and newline.
If no NAMEs are supplied, the line read is stored in the REPLY variable.
Options:
-a array assign the words read to sequential indices of the array
variable ARRAY, starting at zero
-d delim continue until the first character of DELIM is read, rather
than newline
-e use Readline to obtain the line
-i text use TEXT as the initial text for Readline
-n nchars return after reading NCHARS characters rather than waiting
for a newline, but honor a delimiter if fewer than
NCHARS characters are read before the delimiter
-N nchars return only after reading exactly NCHARS characters, unless
EOF is encountered or read times out, ignoring any
delimiter
-p prompt output the string PROMPT without a trailing newline before
attempting to read
-r do not allow backslashes to escape any characters
-s do not echo input coming from a terminal
-t timeout time out and return failure if a complete line of
input is not read within TIMEOUT seconds. The value of the
TMOUT variable is the default timeout. TIMEOUT may be a
fractional number. If TIMEOUT is 0, read returns
immediately, without trying to read any data, returning
success only if input is available on the specified
file descriptor. The exit status is greater than 128
if the timeout is exceeded
-u fd read from file descriptor FD instead of the standard input
Exit Status:
The return code is zero, unless end-of-file is encountered, read times out
(in which case it's greater than 128), a variable assignment error occurs,
or an invalid file descriptor is supplied as the argument to -u.Read lines from a file into an array variable.
A synonym for `mapfile'.Read lines from the standard input into an indexed array variable.
Read lines from the standard input into the indexed array variable ARRAY, or
from file descriptor FD if the -u option is supplied. The variable MAPFILE
is the default ARRAY.
Options:
-d delim Use DELIM to terminate lines, instead of newline
-n count Copy at most COUNT lines. If COUNT is 0, all lines are copied
-O origin Begin assigning to ARRAY at index ORIGIN. The default index is 0
-s count Discard the first COUNT lines read
-t Remove a trailing DELIM from each line read (default newline)
-u fd Read lines from file descriptor FD instead of the standard input
-C callback Evaluate CALLBACK each time QUANTUM lines are read
-c quantum Specify the number of lines read between each call to
CALLBACK
Arguments:
ARRAY Array variable name to use for file data
If -C is supplied without -c, the default quantum is 5000. When
CALLBACK is evaluated, it is supplied the index of the next array
element to be assigned and the line to be assigned to that element
as additional arguments.
If not supplied with an explicit origin, mapfile will clear ARRAY before
assigning to it.
Exit Status:
Returns success unless an invalid option is given or ARRAY is readonly or
not an indexed array.Record lockRemember or display program locations.
Determine and remember the full pathname of each command NAME. If
no arguments are given, information about remembered commands is displayed.
Options:
-d forget the remembered location of each NAME
-l display in a format that may be reused as input
-p pathname use PATHNAME as the full pathname of NAME
-r forget all remembered locations
-t print the remembered location of each NAME, preceding
each location with the corresponding NAME if multiple
NAMEs are given
Arguments:
NAME Each NAME is searched for in $PATH and added to the list
of remembered commands.
Exit Status:
Returns success unless NAME is not found or an invalid option is given.Remove directories from stack.
Removes entries from the directory stack. With no arguments, removes
the top directory from the stack, and changes to the new top directory.
Options:
-n Suppresses the normal change of directory when removing
directories from the stack, so only the stack is manipulated.
Arguments:
+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.
The `dirs' builtin displays the directory stack.
Exit Status:
Returns success unless an invalid argument is supplied or the directory
change fails.Remove each NAME from the list of defined aliases.
Options:
-a remove all alias definitions
Return success unless a NAME is not an existing alias.Remove jobs from current shell.
Removes each JOBSPEC argument from the table of active jobs. Without
any JOBSPECs, the shell uses its notion of the current job.
Options:
-a remove all jobs if JOBSPEC is not supplied
-h mark each JOBSPEC so that SIGHUP is not sent to the job if the
shell receives a SIGHUP
-r remove only running jobs
Exit Status:
Returns success unless an invalid option or JOBSPEC is given.Removes entries from the directory stack. With no arguments, removes
the top directory from the stack, and changes to the new top directory.
Options:
-n Suppresses the normal change of directory when removing
directories from the stack, so only the stack is manipulated.
Arguments:
+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.
The `dirs' builtin displays the directory stack.Replace the shell with the given command.
Execute COMMAND, replacing this shell with the specified program.
ARGUMENTS become the arguments to COMMAND. If COMMAND is not specified,
any redirections take effect in the current shell.
Options:
-a name pass NAME as the zeroth argument to COMMAND
-c execute COMMAND with an empty environment
-l place a dash in the zeroth argument to COMMAND
If the command cannot be executed, a non-interactive shell exits, unless
the shell option `execfail' is set.
Exit Status:
Returns success unless COMMAND is not found or a redirection error occurs.Report time consumed by pipeline's execution.
Execute PIPELINE and print a summary of the real time, user CPU time,
and system CPU time spent executing PIPELINE when it terminates.
Options:
-p print the timing summary in the portable Posix format
The value of the TIMEFORMAT variable is used as the output format.
Exit Status:
The return status is the return status of PIPELINE.Resume for, while, or until loops.
Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.
If N is specified, resumes the Nth enclosing loop.
Exit Status:
The exit status is 0 unless N is not greater than or equal to 1.Resume job in foreground.
Equivalent to the JOB_SPEC argument to the `fg' command. Resume a
stopped or background job. JOB_SPEC can specify either a job name
or a job number. Following JOB_SPEC with a `&' places the job in
the background, as if the job specification had been supplied as an
argument to `bg'.
Exit Status:
Returns the status of the resumed job.Return a successful result.
Exit Status:
Always succeeds.Return an unsuccessful result.
Exit Status:
Always fails.Return from a shell function.
Causes a function or sourced script to exit with the return value
specified by N. If N is omitted, the return status is that of the
last command executed within the function or script.
Exit Status:
Returns N, or failure if the shell is not executing a function or script.Return the context of the current subroutine call.
Without EXPR, returns "$line $filename". With EXPR, returns
"$line $subroutine $filename"; this extra information can be used to
provide a stack trace.
The value of EXPR indicates how many call frames to go back before the
current one; the top frame is frame 0.
Exit Status:
Returns 0 unless the shell is not executing a shell function or EXPR
is invalid.Returns the context of the current subroutine call.
Without EXPR, returns "$line $filename". With EXPR, returns
"$line $subroutine $filename"; this extra information can be used to
provide a stack trace.
The value of EXPR indicates how many call frames to go back before the
current one; the top frame is frame 0.RunningSegmentation faultSelect words from a list and execute commands.
The WORDS are expanded, generating a list of words. The
set of expanded words is printed on the standard error, each
preceded by a number. If `in WORDS' is not present, `in "$@"'
is assumed. The PS3 prompt is then displayed and a line read
from the standard input. If the line consists of the number
corresponding to one of the displayed words, then NAME is set
to that word. If the line is empty, WORDS and the prompt are
redisplayed. If EOF is read, the command completes. Any other
value read causes NAME to be set to null. The line read is saved
in the variable REPLY. COMMANDS are executed after each selection
until a break command is executed.
Exit Status:
Returns the status of the last command executed.Send a signal to a job.
Send the processes identified by PID or JOBSPEC the signal named by
SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then
SIGTERM is assumed.
Options:
-s sig SIG is a signal name
-n sig SIG is a signal number
-l list the signal names; if arguments follow `-l' they are
assumed to be signal numbers for which names should be listed
-L synonym for -l
Kill is a shell builtin for two reasons: it allows job IDs to be used
instead of process IDs, and allows processes to be killed if the limit
on processes that you can create is reached.
Exit Status:
Returns success unless an invalid option is given or an error occurs.Set Readline key bindings and variables.
Bind a key sequence to a Readline function or a macro, or set a
Readline variable. The non-option argument syntax is equivalent to
that found in ~/.inputrc, but must be passed as a single argument:
e.g., bind '"\C-x\C-r": re-read-init-file'.
Options:
-m keymap Use KEYMAP as the keymap for the duration of this
command. Acceptable keymap names are emacs,
emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,
vi-command, and vi-insert.
-l List names of functions.
-P List function names and bindings.
-p List functions and bindings in a form that can be
reused as input.
-S List key sequences that invoke macros and their values
-s List key sequences that invoke macros and their values
in a form that can be reused as input.
-V List variable names and values
-v List variable names and values in a form that can
be reused as input.
-q function-name Query about which keys invoke the named function.
-u function-name Unbind all keys which are bound to the named function.
-r keyseq Remove the binding for KEYSEQ.
-f filename Read key bindings from FILENAME.
-x keyseq:shell-command Cause SHELL-COMMAND to be executed when
KEYSEQ is entered.
-X List key sequences bound with -x and associated commands
in a form that can be reused as input.
Exit Status:
bind returns 0 unless an unrecognized option is given or an error occurs.Set and unset shell options.
Change the setting of each shell option OPTNAME. Without any option
arguments, list each supplied OPTNAME, or all shell options if no
OPTNAMEs are given, with an indication of whether or not each is set.
Options:
-o restrict OPTNAMEs to those defined for use with `set -o'
-p print each shell option with an indication of its status
-q suppress output
-s enable (set) each OPTNAME
-u disable (unset) each OPTNAME
Exit Status:
Returns success if OPTNAME is enabled; fails if an invalid option is
given or OPTNAME is disabled.Set export attribute for shell variables.
Marks each NAME for automatic export to the environment of subsequently
executed commands. If VALUE is supplied, assign VALUE before exporting.
Options:
-f refer to shell functions
-n remove the export property from each NAME
-p display a list of all exported variables and functions
An argument of `--' disables further option processing.
Exit Status:
Returns success unless an invalid option is given or NAME is invalid.Set or unset values of shell options and positional parameters.
Change the value of shell attributes and positional parameters, or
display the names and values of shell variables.
Options:
-a Mark variables which are modified or created for export.
-b Notify of job termination immediately.
-e Exit immediately if a command exits with a non-zero status.
-f Disable file name generation (globbing).
-h Remember the location of commands as they are looked up.
-k All assignment arguments are placed in the environment for a
command, not just those that precede the command name.
-m Job control is enabled.
-n Read commands but do not execute them.
-o option-name
Set the variable corresponding to option-name:
allexport same as -a
braceexpand same as -B
emacs use an emacs-style line editing interface
errexit same as -e
errtrace same as -E
functrace same as -T
hashall same as -h
histexpand same as -H
history enable command history
ignoreeof the shell will not exit upon reading EOF
interactive-comments
allow comments to appear in interactive commands
keyword same as -k
monitor same as -m
noclobber same as -C
noexec same as -n
noglob same as -f
nolog currently accepted but ignored
notify same as -b
nounset same as -u
onecmd same as -t
physical same as -P
pipefail the return value of a pipeline is the status of
the last command to exit with a non-zero status,
or zero if no command exited with a non-zero status
posix change the behavior of bash where the default
operation differs from the Posix standard to
match the standard
privileged same as -p
verbose same as -v
vi use a vi-style line editing interface
xtrace same as -x
-p Turned on whenever the real and effective user ids do not match.
Disables processing of the $ENV file and importing of shell
functions. Turning this option off causes the effective uid and
gid to be set to the real uid and gid.
-t Exit after reading and executing one command.
-u Treat unset variables as an error when substituting.
-v Print shell input lines as they are read.
-x Print commands and their arguments as they are executed.
-B the shell will perform brace expansion
-C If set, disallow existing regular files to be overwritten
by redirection of output.
-E If set, the ERR trap is inherited by shell functions.
-H Enable ! style history substitution. This flag is on
by default when the shell is interactive.
-P If set, do not resolve symbolic links when executing commands
such as cd which change the current directory.
-T If set, the DEBUG and RETURN traps are inherited by shell functions.
-- Assign any remaining arguments to the positional parameters.
If there are no remaining arguments, the positional parameters
are unset.
- Assign any remaining arguments to the positional parameters.
The -x and -v options are turned off.
Using + rather than - causes these flags to be turned off. The
flags can also be used upon invocation of the shell. The current
set of flags may be found in $-. The remaining n ARGs are positional
parameters and are assigned, in order, to $1, $2, .. $n. If no
ARGs are given, all shell variables are printed.
Exit Status:
Returns success unless an invalid option is given.Set variable values and attributes.
A synonym for `declare'. See `help declare'.Set variable values and attributes.
Declare variables and give them attributes. If no NAMEs are given,
display the attributes and values of all variables.
Options:
-f restrict action or display to function names and definitions
-F restrict display to function names only (plus line number and
source file when debugging)
-g create global variables when used in a shell function; otherwise
ignored
-I if creating a local variable, inherit the attributes and value
of a variable with the same name at a previous scope
-p display the attributes and value of each NAME
Options which set attributes:
-a to make NAMEs indexed arrays (if supported)
-A to make NAMEs associative arrays (if supported)
-i to make NAMEs have the `integer' attribute
-l to convert the value of each NAME to lower case on assignment
-n make NAME a reference to the variable named by its value
-r to make NAMEs readonly
-t to make NAMEs have the `trace' attribute
-u to convert the value of each NAME to upper case on assignment
-x to make NAMEs export
Using `+' instead of `-' turns off the given attribute.
Variables with the integer attribute have arithmetic evaluation (see
the `let' command) performed when the variable is assigned a value.
When used in a function, `declare' makes NAMEs local, as with the `local'
command. The `-g' option suppresses this behavior.
Exit Status:
Returns success unless an invalid option is supplied or a variable
assignment error occurs.Shell commands matching keyword `Shell commands matching keywords `Shell options:
Shift positional parameters.
Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is
not given, it is assumed to be 1.
Exit Status:
Returns success unless N is negative or greater than $#.Signal %dSpecify how arguments are to be completed by Readline.
For each NAME, specify how arguments are to be completed. If no options
are supplied, existing completion specifications are printed in a way that
allows them to be reused as input.
Options:
-p print existing completion specifications in a reusable format
-r remove a completion specification for each NAME, or, if no
NAMEs are supplied, all completion specifications
-D apply the completions and actions as the default for commands
without any specific completion defined
-E apply the completions and actions to "empty" commands --
completion attempted on a blank line
-I apply the completions and actions to the initial (usually the
command) word
When completion is attempted, the actions are applied in the order the
uppercase-letter options are listed above. If multiple options are supplied,
the -D option takes precedence over -E, and both take precedence over -I.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.StoppedStopped (signal)Stopped (tty input)Stopped (tty output)Stopped(%s)Suspend shell execution.
Suspend the execution of this shell until it receives a SIGCONT signal.
Unless forced, login shells cannot be suspended.
Options:
-f force the suspend, even if the shell is a login shell
Exit Status:
Returns success unless job control is not enabled or an error occurs.TIMEFORMAT: `%c': invalid format characterTerminatedThe mail in %s has been read
There are running jobs.
There are stopped jobs.
There is NO WARRANTY, to the extent permitted by law.These shell commands are defined internally. Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.
A star (*) next to a name means that the command is disabled.
This is free software; you are free to change and redistribute it.Trap signals and other events.
Defines and activates handlers to be run when the shell receives signals
or other conditions.
ARG is a command to be read and executed when the shell receives the
signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC
is supplied) or `-', each specified signal is reset to its original
value. If ARG is the null string each SIGNAL_SPEC is ignored by the
shell and by the commands it invokes.
If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. If
a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. If
a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a
script run by the . or source builtins finishes executing. A SIGNAL_SPEC
of ERR means to execute ARG each time a command's failure would cause the
shell to exit when the -e option is enabled.
If no arguments are supplied, trap prints the list of commands associated
with each signal.
Options:
-l print a list of signal names and their corresponding numbers
-p display the trap commands associated with each SIGNAL_SPEC
Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal number.
Signal names are case insensitive and the SIG prefix is optional. A
signal may be sent to the shell with "kill -signal $$".
Exit Status:
Returns success unless a SIGSPEC is invalid or an invalid option is given.Type `%s -c "help set"' for more information about shell options.
Type `%s -c help' for more information about shell builtin commands.
Unknown Signal #%dUnknown errorUnknown statusUnset values and attributes of shell variables and functions.
For each NAME, remove the corresponding variable or function.
Options:
-f treat each NAME as a shell function
-v treat each NAME as a shell variable
-n treat each NAME as a name reference and unset the variable itself
rather than the variable it references
Without options, unset first tries to unset a variable, and if that fails,
tries to unset a function.
Some variables cannot be unset; also see `readonly'.
Exit Status:
Returns success unless an invalid option is given or a NAME is read-only.Urgent IO conditionUsage: %s [GNU long option] [option] ...
%s [GNU long option] [option] script-file ...
Use "%s" to leave the shell.
Use the `bashbug' command to report bugs.
User signal 1User signal 2Wait for job completion and return exit status.
Waits for each process identified by an ID, which may be a process ID or a
job specification, and reports its termination status. If ID is not
given, waits for all currently active child processes, and the return
status is zero. If ID is a job specification, waits for all processes
in that job's pipeline.
If the -n option is supplied, waits for a single job from the list of IDs,
or, if no IDs are supplied, for the next job to complete and returns its
exit status.
If the -p option is supplied, the process or job identifier of the job
for which the exit status is returned is assigned to the variable VAR
named by the option argument. The variable will be unset initially, before
any assignment. This is useful only when the -n option is supplied.
If the -f option is supplied, and job control is enabled, waits for the
specified ID to terminate, instead of waiting for it to change status.
Exit Status:
Returns the status of the last ID; fails if ID is invalid or an invalid
option is given, or if -n is supplied and the shell has no unwaited-for
children.Wait for process completion and return exit status.
Waits for each process specified by a PID and reports its termination status.
If PID is not given, waits for all currently active child processes,
and the return status is zero. PID must be a process ID.
Exit Status:
Returns the status of the last PID; fails if PID is invalid or an invalid
option is given.Window changedWrite arguments to the standard output.
Display the ARGs on the standard output followed by a newline.
Options:
-n do not append a newline
Exit Status:
Returns success unless a write error occurs.Write arguments to the standard output.
Display the ARGs, separated by a single space character and followed by a
newline, on the standard output.
Options:
-n do not append a newline
-e enable interpretation of the following backslash escapes
-E explicitly suppress interpretation of backslash escapes
`echo' interprets the following backslash-escaped characters:
\a alert (bell)
\b backspace
\c suppress further output
\e escape character
\E escape character
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\0nnn the character whose ASCII code is NNN (octal). NNN can be
0 to 3 octal digits
\xHH the eight-bit character whose value is HH (hexadecimal). HH
can be one or two hex digits
\uHHHH the Unicode character whose value is the hexadecimal value HHHH.
HHHH can be one to four hex digits.
\UHHHHHHHH the Unicode character whose value is the hexadecimal value
HHHHHHHH. HHHHHHHH can be one to eight hex digits.
Exit Status:
Returns success unless a write error occurs.You have mail in $_You have new mail in $_[ arg... ][[ expression ]]`%c': bad command`%c': invalid format character`%c': invalid symbolic mode character`%c': invalid symbolic mode operator`%c': invalid time format specification`%s': cannot unbind`%s': cannot unbind in command keymap`%s': invalid alias name`%s': invalid keymap name`%s': invalid variable name for name reference`%s': is a special builtin`%s': missing format character`%s': not a pid or valid job spec`%s': not a valid identifier`%s': unknown function name`)' expected`)' expected, found %s`:' expected for conditional expressionadd_process: pid %5ld (%s) marked as still alivealias [-p] [name[=value] ... ]all_local_variables: no function context at current scopeargumentargument expectedarray variable support requiredattempted assignment to non-variablebad array subscriptbad command typebad connectorbad jumpbad substitution: no closing "`" in %sbad substitution: no closing `%s' in %sbash home page: <http://www.gnu.org/software/bash>
bash_execute_unix_command: cannot find keymap for commandbg [job_spec ...]bgp_delete: LOOP: psi (%d) == storage[psi].bucket_nextbgp_search: LOOP: psi (%d) == storage[psi].bucket_nextbind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]brace expansion: cannot allocate memory for %sbrace expansion: failed to allocate memory for %u elementsbrace expansion: failed to allocate memory for `%s'break [n]bug: bad expassign tokenbuiltin [shell-builtin [arg ...]]caller [expr]can only `return' from a function or sourced scriptcan only be used in a functioncannot allocate new file descriptor for bash input from fd %dcannot create temp file for here-document: %scannot duplicate fd %d to fd %dcannot duplicate named pipe %s as fd %dcannot find %s in shared object %s: %scannot make child for command substitutioncannot make child for process substitutioncannot make pipe for command substitutioncannot make pipe for process substitutioncannot open named pipe %s for readingcannot open named pipe %s for writingcannot open shared object %s: %scannot redirect standard input from /dev/null: %scannot reset nodelay mode for fd %dcannot set and unset shell options simultaneouslycannot set gid to %d: effective gid %dcannot set terminal process group (%d)cannot set uid to %d: effective uid %dcannot simultaneously unset a function and a variablecannot start debugger; debugging mode disabledcannot suspendcannot suspend a login shellcannot use `-f' to make functionscannot use more than one of -anrwcase WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esaccd [-L|[-P [-e]] [-@]] [dir]child setpgid (%ld to %ld)command [-pVv] command [arg ...]command substitution: ignored null byte in inputcommand_substitute: cannot duplicate pipe as fd 1compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]completion: function `%s' not foundcompopt [-o|+o option] [-DEI] [name ...]conditional binary operator expectedcontinue [n]coproc [NAME] command [redirections]could not find /tmp, please create!cprintf: `%c': invalid format charactercurrentdeclare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]deleting stopped job %d with process group %lddescribe_pid: %ld: no such piddirectory stack emptydirectory stack indexdirs [-clpv] [+N] [-N]disown [-h] [-ar] [jobspec ... | pid ...]division by 0dynamic loading not availableecho [-n] [arg ...]echo [-neE] [arg ...]empty array variable nameenable [-a] [-dnps] [-f filename] [name ...]error getting terminal attributes: %serror importing function definition for `%s'error setting terminal attributes: %seval [arg ...]eval: maximum eval nesting level exceeded (%d)exec [-cl] [-a name] [command [argument ...]] [redirection ...]execute_coproc: coproc [%d:%s] still existsexit [n]expected `)'exponent less than 0export [-fn] [name[=value] ...] or export -pexpression expectedexpression recursion level exceededfc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]fg [job_spec]file descriptor out of rangefilename argument requiredfor (( exp1; exp2; exp3 )); do COMMANDS; donefor NAME [in WORDS ... ] ; do COMMANDS; doneforked pid %d appears in running job %dformat parsing problem: %sfree: called with already freed block argumentfree: called with unallocated block argumentfree: start and end chunk sizes differfree: underflow detected; magic8 corruptedfree: underflow detected; mh_nbytes out of rangefunction name { COMMANDS ; } or name () { COMMANDS ; }future versions of the shell will force evaluation as an arithmetic substitutiongetcwd: cannot access parent directoriesgetopts optstring name [arg ...]hash [-lr] [-p pathname] [-dt] [name ...]hashing disabledhelp [-dms] [pattern ...]help not available in this versionhere-document at line %d delimited by end-of-file (wanted `%s')history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]history positionhistory specificationhits command
identifier expected after pre-increment or pre-decrementif COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fiinitialize_job_control: getpgrp failedinitialize_job_control: line disciplineinitialize_job_control: no job control in backgroundinitialize_job_control: setpgidinvalid arithmetic baseinvalid baseinvalid character %d in exportstr for %sinvalid hex numberinvalid integer constantinvalid numberinvalid octal numberinvalid signal numberjob %d started without job controljob_spec [&]jobs [-lnprs] [jobspec ...] or jobs -x command [args]kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]last command: %s
let arg [arg ...]limitline %d: line editing not enabledload function for %s returns failure (%d): not loadedlocal [option] name[=value] ...logout
logout [n]loop countmake_here_document: bad instruction type %dmake_local_variable: no function context at current scopemake_redirection: redirection instruction `%d' out of rangemalloc: block on free list clobberedmalloc: failed assertion: %s
mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]maximum here-document count exceededmigrate process to another CPUmissing `)'missing `]'missing hex digit for \xmissing unicode digit for \%cnetwork operations not supportedno `=' in exportstr for %sno closing `%c' in %sno command foundno help topics match `%s'. Try `help help' or `man -k %s' or `info %s'.no job controlno job control in this shellno match: %sno other directoryno other options allowed with `-x'not currently executing completion functionnot login shell: use `exit'null directoryoctal numberonly meaningful in a `for', `while', or `until' looppipe errorpop_scope: head of shell_variables not a temporary environment scopepop_var_context: head of shell_variables not a function contextpop_var_context: no global_variables contextpopd [-n] [+N | -N]power failure imminentpretty-printing mode ignored in interactive shellsprint_command: bad connector `%d'printf [-v var] format [arguments]progcomp_insert: %s: NULL COMPSPECprogrammable_completion: %s: possible retry loopprogramming errorpushd [-n] [+N | -N | dir]pwd [-LP]read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]read error: %d: %sreadarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]readonly [-aAf] [name[=value] ...] or readonly -prealloc: called with unallocated block argumentrealloc: start and end chunk sizes differrealloc: underflow detected; magic8 corruptedrealloc: underflow detected; mh_nbytes out of rangerecursion stack underflowredirection error: cannot duplicate fdregister_alloc: %p already in table as allocated?
register_alloc: alloc table is full with FIND_ALLOC?
register_free: %p already in table as free?
restrictedreturn [n]run_pending_traps: bad value in trap_list[%d]: %prun_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myselfsave_bash_input: buffer already exists for new fd %dselect NAME [in WORDS ... ;] do COMMANDS; doneset [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]setlocale: %s: cannot change locale (%s)setlocale: %s: cannot change locale (%s): %ssetlocale: LC_ALL: cannot change locale (%s)setlocale: LC_ALL: cannot change locale (%s): %sshell level (%d) too high, resetting to 1shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%lu): line truncatedshift [n]shift countshopt [-pqsu] [-o] [optname ...]sigprocmask: %d: invalid operationsource filename [arguments]start_pipeline: pgrp pipesuspend [-f]syntax errorsyntax error in conditional expressionsyntax error in conditional expression: unexpected token `%s'syntax error in expressionsyntax error in variable assignmentsyntax error near `%s'syntax error near unexpected token `%s'syntax error: `%s' unexpectedsyntax error: `((%s))'syntax error: `;' unexpectedsyntax error: arithmetic expression requiredsyntax error: invalid arithmetic operatorsyntax error: operand expectedsyntax error: unexpected end of filesystem crash imminenttest [expr]time [-p] pipelinetoo many argumentstrap [-lp] [[arg] signal_spec ...]trap handler: maximum trap handler level exceeded (%d)trap_handler: bad signal %dtype [-afptP] name [name ...]typeset [-aAfFgiIlnrtux] name[=value] ... or typeset -p [-aAfFilnrtux] [name ...]ulimit [-SHabcdefiklmnpqrstuvxPRT] [limit]umask [-p] [-S] [mode]unalias [-a] name [name ...]unexpected EOF while looking for `]]'unexpected EOF while looking for matching `%c'unexpected EOF while looking for matching `)'unexpected argument `%s' to conditional binary operatorunexpected argument `%s' to conditional unary operatorunexpected argument to conditional binary operatorunexpected argument to conditional unary operatorunexpected token %d in conditional commandunexpected token `%c' in conditional commandunexpected token `%s' in conditional commandunexpected token `%s', conditional binary operator expectedunexpected token `%s', expected `)'unknownunknown command errorunset [-f] [-v] [-n] [name ...]until COMMANDS; do COMMANDS-2; donevalue too great for basevariables - Names and meanings of some shell variableswait [-fn] [-p var] [id ...]wait [pid ...]wait: pid %ld is not a child of this shellwait_for: No record of process %ldwait_for_job: job %d is stoppedwaitchld: turning on WNOHANG to avoid indefinite blockwarning: warning: %s: %swarning: -C option may not work as you expectwarning: -F option may not work as you expectwhile COMMANDS; do COMMANDS-2; donewrite error: %sxtrace fd (%d) != fileno xtrace fp (%d)xtrace_set: %d: invalid file descriptorxtrace_set: NULL file pointer{ COMMANDS ; }Project-Id-Version: bash 5.2-rc1
Report-Msgid-Bugs-To:
PO-Revision-Date: 2022-06-18 14:25+0800
Last-Translator: Wenbin Lv <wenbin816@gmail.com>
Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>
Language: zh_CN
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=1; plural=0;
X-Bugs: Report translation errors to the Language-Team address.
X-Generator: Poedit 3.1
等待输入超时:自动注销
-%s 或 -o <选项>
-ilrsD 或 -c <命令> 或 -O <shopt 选项> (仅适合调用)
malloc: %s:%d: 断言已搞砸
(工作目录:%s)(核心已转储) 行 $%s: 无法这样赋值%c%c: 无效的选项%d: 无效的文件描述符:%s%s 已被绑定到 %s 的 exportstr 为空%s 是 %s
%s 是函数
%s 是 shell 内建
%s 是 shell 关键字
%s 是特殊 shell 内建
%s 是 "%s" 的别名
%s 已被录入哈希表 (%s)
%s 未与任何键绑定。
%s超出范围%s%s%s: %s(错误记号是 "%s")%s: %s%s: %s超出范围%s: %s: 错误的解释器%s: %s: 无法作为 FILE 打开%s: %s: 兼容性的值超出范围%s: %s: 跟踪文件描述符的值无效%s: %s: 为关联数组赋值时必须使用下标%s: %s:%d: 无法分配 %lu 字节%s: %s:%d: 无法分配 %lu 字节(已分配 %lu 字节)%s: 是一个目录%s: 有歧义的任务说明符%s: 有歧义的重定向%s: 参数必须是进程或任务 ID%s: 将整数赋值给名称引用%s: 指定的网络路径无效%s: 错误的替换%s: 需要二元运算符%s: 无法分配 %lu 字节%s: 无法分配 %lu 字节(已分配 %lu 字节)%s: 无法赋值%s: 无法将文件描述符赋值给变量%s: 无法将列表赋值给数组成员%s: 无法为非数值的索引赋值%s: 无法将关联数组转换为索引数组%s: 无法将索引数组转换为关联数组%s: 无法创建:%s%s: 无法删除:%s%s: 无法以这种方式销毁数组变量%s: 无法执行二进制文件%s: 无法执行二进制文件:%s%s: 无法执行:%s%s: 无法执行:找不到需要的文件%s: 无法导出%s: 无法获取限制:%s%s: 无法从不兼容的类型继承值%s: 无法修改限制:%s%s: 无法打开临时文件:%s%s: 无法打开:%s%s: 无法覆盖已存在的文件%s: 无法读取:%s%s: 无法取消设定%s: 无法取消设定:只读%s%s: 循环的名称引用%s: 未找到命令%s: 动态内建已经加载%s: 获取当前目录时出错:%s:%s
%s: 表达式错误
%s: 文件太大%s: 未找到文件%s: 第一个非空白字符不是 `"'%s: 哈希表为空
%s: 历史展开失败%s: 未知的主机%s: 非法的选项 -- %c
%s: inlib 失败%s: 需要整数表达式%s: 无效的动作名%s: 无效的参数%s: 无效的数组起始%s: 无效的回调间隔%s: 指定的文件描述符无效%s: 无效的间接展开%s: 无效的限制参数%s: 无效的行数%s: 无效的选项%s: 无效的选项名%s: 无效的服务%s: 无效的 shell 选项名%s: 无效的信号说明符%s: 指定的超时时间无效%s: 无效的时间戳%s: 无效的变量名%s: 名称引用变量引用的变量名无效%s: 是一个目录%s: 任务 %d 已在后台%s: 任务已经终止%s: 第 %d 行:%s: 超出最大函数嵌套层数 (%d)%s: 超出最大 source 嵌套层数 (%d)%s: 缺少冒号分隔符%s: 不允许名称引用变量引用自身%s: 没有补全规约%s: 无当前任务%s: 无任务控制%s: 无此任务%s: 不是函数%s: 不是普通文件%s: 不是 shell 内建%s: 不是数组变量%s: 不是一个索引数组%s: 未动态加载%s: 未找到%s: 需要数值参数%s: 选项需要一个参数%s: 选项需要一个参数 -- %c
%s: 参数未设置%s: 参数为空或未设置%s: 带引号的复合数组赋值已被弃用%s: 只读函数%s: 只读变量%s: 引用变量不能为数组%s: 正在移除名称引用属性%s: 受限%s: 受限:无法重定向输出%s: 受限:无法在命令名中使用 "/"%s: 子串表达式 < 0%s: 需要一元运算符%s: 未绑定的变量%s: 用法:%s: 变量不可赋值" 的 shell 命令
(( 表达式 ))(核心已转储)(当前工作目录:%s)
. 文件名 [参数]没有网络时不支持 /dev/(tcp|udp)/host/port/tmp 必须为有效的目录名<无当前目录>中止指令正在中止...将目录添加到栈中。
将目录添加到目录栈顶,或者轮转栈直到当前工作目录成为
新的栈顶。不带参数时,交换栈顶的两个目录。
选项:
-n 阻止添加目录至栈时通常的改变目录操作,从而仅对栈
进行操作。
参数:
+N 轮转栈,使得第 N 个目录("dirs" 显示的列表中左起,
从零开始)移动到栈顶。
-N 轮转栈,使得第 N 个目录("dirs" 显示的列表中右起,
从零开始)移动到栈顶。
目录 将 <目录> 添加到栈顶,使其成为当前工作目录。
"dirs" 内建可以显示目录栈。
退出状态:
返回成功,除非使用了无效的参数,或者改变目录失败。将目录添加到目录栈顶,或者轮转栈直到当前工作目录成为
新的栈顶。不带参数时,交换栈顶的两个目录。
选项:
-n 阻止添加目录至栈时通常的改变目录操作,从而仅对栈
进行操作。
参数:
+N 轮转栈,使得第 N 个目录("dirs" 显示的列表中左起,
从零开始)移动到栈顶。
-N 轮转栈,使得第 N 个目录("dirs" 显示的列表中右起,
从零开始)移动到栈顶。
目录 将 <目录> 添加到栈顶,使其成为当前工作目录。
"dirs" 内建可以显示目录栈。闹钟(性能分析)闹钟(虚拟)闹钟算术 for 循环。
等价于
(( 表达式1 ))
while (( 表达式2 )); do
命令
(( 表达式3 ))
done
<表达式1>、<表达式2> 和 <表达式3> 都是算术表达式。如果省略任何表达式,
则等价于使用了求值结果为 1 的表达式。
退出状态:
返回最后执行的命令的状态。断点跟踪或陷阱错误的系统调用伪信号断开的管道总线错误CPU 限制改变 shell 工作目录。
改变当前目录至 <目录>。默认的 <目录> 是 shell 变量 HOME 的值。
变量 CDPATH 定义了搜索含有 <目录> 的目录的搜索路径。CDPATH 中额外的
目录名称以冒号 (:) 隔开。空的 CDPATH 表示当前目录。如果 <目录> 以
斜杠 (/) 开头,则不会使用 CDPATH。
如果找不到目录,并且 shell 选项 "cdable_vars" 被设定,则假定参数是一个
变量名。如果该变量有值,则它的值被当作 <目录>。
选项:
-L 强制跟随符号链接: 在处理 ".." 之后解析 <目录> 中的符号链接
-P 使用物理目录结构而不跟随符号链接: 在处理 ".." 之前
解析 <目录> 中的符号链接
-e 如果使用了 -P 选项,但无法成功确定当前工作目录时,以非零状态退出
-@ 在支持扩展属性的系统上,将一个具有扩展属性的文件当作
含有文件属性的目录。
默认情况下,跟随符号链接,正如指定了 "-L" 一样。
".." 的处理方式是,移除路径名中的上一个组成部分,以 <目录> 的开头
或者斜杠为界限。
退出状态:
如果目录改变,或在使用 -P 选项时 $PWD 修改成功,则返回 0;否则返回非零。子进程已死或已停止常用 shell 变量名称和用法。
BASH_VERSION 当前 Bash 的版本信息。
CDPATH 用于搜索 "cd" 的参数中的目录的,以冒号分隔的目录列表
GLOBIGNORE 路径名展开时要忽略的文件名的模式列表,以冒号分隔。
HISTFILE 存储您的命令历史的文件名称。
HISTFILESIZE 历史文件最多可以保存的行数。
HISTSIZE 一个运行的 shell 最多可以访问的历史命令行数。
HOME 您的登录目录的完整路径名。
HOSTNAME 当前主机的主机名。
HOSTTYPE 运行当前版本 BASH 的 CPU 的类型。
IGNOREEOF 控制 shell 收到 EOF 作为唯一输入字符后的动作。如果
该变量被设定,则它的值是 shell 退出之前在一个空行上
可以连续读取到的 EOF 数量(默认为 10)。如果未设定,
EOF 标志着输入的结束。
MACHTYPE 描述当前运行 Bash 的系统的字符串。
MAILCHECK Bash 检查新邮件的频率,以秒为单位。
MAILPATH Bash 从中检查新邮件的文件列表,以冒号分隔。
OSTYPE 运行当前版本 Bash 的 Unix 版本。
PATH 寻找命令时搜索的目录列表,以冒号分隔。
PROMPT_COMMAND 每次打印主提示符之前执行的命令。
PS1 主提示符字符串。
PS2 次提示符字符串。
PWD 当前目录的完整路径名。
SHELLOPTS 已启用的 shell 选项列表,以冒号分隔。
TERM 当前终端类型的名称。
TIMEFORMAT 保留字 "time" 显示的时间统计信息的输出格式。
auto_resume 非空时,一个单独的命令词会首先被在当前已停止的
任务列表中搜索。如果找到,则该任务被置于前台。
如果值为 "exact" 则意味着命令词必须精确匹配已停止的
任务列表中的命令。如果值为 "substring" 则意味着命令词
必须匹配任务的一个子字符串。任何其他的值意味着命令词
必须是已停止的任务的一个前缀。
histchars 控制历史展开和快速替换的字符。第一个字符是
历史替换字符,通常是 "!"。第二个字符是快速替换字符,
通常是 "^"。第三个字符是历史注释字符,通常是 "#"。
HISTIGNORE 用于决定哪些命令被存入历史文件的模式列表,以冒号分隔。
继续Copyright (C) 2022 自由软件基金会创建一个名为 <名称> 的副进程。
异步执行 <命令>,并将命令的标准输出和标准输入通过管道连接到执行该命令
的 shell 的文件描述符,再将两个文件描述符分别赋值给数组变量 <名称> 的
索引为 0 和 1 的元素。
默认的 <名称> 是 "COPROC"。
退出状态:
coproc 命令返回退出状态 0。调试警告:定义局部变量。
创建一个名为 <名称> 的变量,并且将 <值> 赋给它。<选项> 可以是任何
能被 "declare" 接受的选项。
局部变量只能在函数内部使用,它们只对定义它们的函数及其子函数可见。
退出状态:
返回成功,除非使用了无效的选项、发生了赋值错误,或者 shell 不在
执行一个函数。定义或显示别名。
不带参数时,"alias" 以可重用的格式 "alias 名称=值" 将别名列表
打印到标准输出。
否则,对于每一个给出了 <值> 的 <名称> 定义一个别名。如果 <值> 的
末尾是空格,那么在展开该别名后,还会继续检查下一个词是否可以
进行别名替换。
选项:
-p 以可重用的格式打印所有已定义的别名
退出状态:
alias 返回真,除非提供了一个尚未定义别名的 <名称>。定义 shell 函数。
创建一个名为 <名称> 的 shell 函数。当作为一个简单命令被调用时,
<名称> 在调用它的 shell 的上下文中执行 <命令>。当 <名称> 被调用时,
传递给函数的参数储存在 $1...$n 中,函数名储存在 $FUNCNAME 中。
退出状态:
返回成功,除非 <名称> 为只读。显示目录栈。
显示当前记住的目录列表。 使用 "pushd" 命令将目录加入这个列表;
使用 "popd" 命令逐个回到之前加入列表的目录。
选项:
-c 删除所有元素以清空目录栈
-l 打印目录时,不表示为以波浪号 (~) 为前缀的,
相对于您的主目录的路径
-p 每行一个条目打印目录栈
-v 每行一个条目打印目录栈,前面加上在栈中的位置
参数:
+N 显示 dirs 不带选项启动时显示的目录列表中左起第 N 个目录,
从零开始。
-N 显示 dirs 不带选项启动时显示的目录列表中右起第 N 个目录,
从零开始。
退出状态:
返回成功,除非使用了无效的选项,或者有错误发生。显示内建命令的相关信息。
显示内建命令的简略信息。如果指定了 <模式>,给出所有匹配 <模式>
的命令的详细帮助,否则打印帮助主题列表。
选项:
-d 输出每个主题的简短描述
-m 以伪 man 手册的格式显示用法
-s 仅对每一个匹配 <模式> 的主题输出简短的用法提要
参数:
模式 用来确定帮助主题的模式
退出状态:
返回成功,除非没有找到 <模式>,或者使用了无效的选项。显示关于命令类型的信息。
对于每一个 <名称>,指出如果作为命令名使用时,它将如何被解释。
选项:
-a 当且仅当没有同时使用 "-p" 选项时,显示所有包含名为 <名称>
的可执行文件的位置;包括别名、内建和函数
-f 阻止 shell 函数查找流程
-P 强制对每个 <名称> 搜索 PATH,即使它是别名、内建或函数,
并且返回将被执行的磁盘上的文件的名称
-p 返回将被执行的磁盘上的文件的名称,或者当 "type -t 名称"
不返回 "file" 时,不返回任何值
-t 返回下列单词中的一个:"alias"、"keyword"、"function"、
"builtin"、"file" 或者 "",分别表示 <名称> 是一个别名、
shell 保留字、shell 函数、shell 内建、磁盘文件或者未找到
参数:
名称 需要解释的命令。
退出状态:
如果所有的 <名称> 都被找到则返回成功;任何一个未找到则失败。从历史列表中显示或者执行命令。
fc 可用于从历史列表中列出命令,或者编辑并重新执行命令。
<起始> 和 <终止> 可以是用来指定范围的数字,或者 <起始> 可以是
字符串,表示以这个字符串打头的最近的一个命令。
选项:
-e 编辑器名 选择使用哪个编辑器。默认使用 FCEDIT,然后
是 EDITOR,然后是 vi
-l 列出行而不编辑
-n 列举时省略行号
-r 反转行的顺序(新的在前)
使用 "fc -s [模式=替换串 ...] [命令]" 的格式,<命令> 会在完成
<模式>=<替换串> 的替换之后被重新执行。
r='fc -s' 是一个有用的别名,这样的话输入 "r cc" 会执行最后一个以 "cc"
开头的命令,输入 "r" 会重新执行最后一个命令。
退出状态:
返回成功,或者执行的命令的状态;如果有错误发生,则返回非零。显示或操纵历史列表。
带行号显示历史列表,将每个被修改的条目加上 "*" 前缀。
参数 N 会仅列出最后的 N 个条目。
选项:
-c 删除所有条目从而清空历史列表
-d 偏移量 删除位于 <偏移量> 的历史条目。负的 <偏移量> 表示从
历史列表末尾开始倒数
-a 将当前会话的历史追加到历史文件中
-n 从历史文件中读取所有未被读取的行,并且将它们追加到历史列表
-r 读取历史文件并将内容追加到历史列表中
-w 将当前历史写入到历史文件中
-p 对每一个 <参数> 执行历史展开并显示结果,而不存储到历史列表中
-s 将 <参数> 作为单一条目追加到历史列表中
如果给定了 <文件名>,则将其用作历史文件。否则,如果 HISTFILE 变量
有值的话,则使用它,否则使用 ~/.bash_history 文件。
如果 HISTTIMEFORMAT 变量被设定并且不为空,它的值会被用作 strftime(3)
的格式字符串,以打印每个显示的历史条目的时间戳。否则,不打印时间戳。
退出状态:
返回成功,除非使用了无效的选项,或者有错误发生。显示或设定文件模式掩码。
设定用户文件创建掩码为 <模式>。如果省略 <模式>,则打印当前掩码的值。
如果 <模式> 以数字开头,则按照八进制数进行解释;否则视为一个
chmod(1) 可接受的符号模式串。
选项:
-p 如果省略 <模式>,以可重用作输入的格式输出
-S 以符号形式输出,否则以八进制数格式输出
退出状态:
返回成功,除非使用了无效的 <模式> 或者选项。依据选项显示可能的补全。
设计意图是在用来生成可能的补全的 shell 函数的内部使用。
如果提供了可选的 <词语> 参数,则依据 <词语> 产生匹配。
退出状态:
返回成功,除非使用了无效的选项,或者有错误发生。显示进程时间。
打印此 shell 及其所有子进程的累计用户和系统时间。
退出状态:
总是成功。显示任务状态。
列出活动的任务。<任务说明符> 限制仅输出指定的任务。
不带选项时,显示所有活动任务的状态。
选项:
-l 在正常信息的基础上列出进程 ID
-n 仅列出上次通知之后改变了状态的进程
-p 仅列出进程 ID
-r 限制仅输出运行中的任务
-s 限制仅输出已停止的任务
如果使用了 -x 选项,<参数> 中的所有任务说明符会被替换为该任务
的进程组头领的进程 ID,然后用替换后的参数执行 <命令>。
退出状态:
返回成功,除非使用了无效的选项或者有错误发生。
如果使用了 -x 选项,则返回 <命令> 的退出状态。显示当前记住的目录列表。 使用 "pushd" 命令将目录加入这个列表;
使用 "popd" 命令逐个回到之前加入列表的目录。
选项:
-c 删除所有元素以清空目录栈
-l 打印目录时,不表示为以波浪号 (~) 为前缀的,
相对于您的主目录的路径
-p 每行一个条目打印目录栈
-v 每行一个条目打印目录栈,前面加上在栈中的位置
参数:
+N 显示 dirs 不带选项启动时显示的目录列表中左起第 N 个目录,
从零开始。
-N 显示 dirs 不带选项启动时显示的目录列表中右起第 N 个目录,
从零开始。已完成已完成(%d)EMT 指令启用和禁用 shell 内建。
启用和禁用 shell 的内建命令。禁用命令使您能够执行和内建
命令同名的磁盘上的命令,而无须使用完整的路径名。
选项:
-a 打印内建列表,并显示其中每一个是否启用
-n 禁用每一个 <名称> 或者显示被禁用的内建的列表
-p 以可重用的格式打印内建列表
-s 仅打印 Posix "特殊" 内建的名称
控制动态加载的选项:
-f 从共享对象 <文件名> 中加载 <名称> 内建
-d 删除以 -f 选项加载的内建
不带选项时,启用每一个 <名称>。
要使用 $PATH 中找到的 "test" 而不是 shell 内建的版本,
请输入 "enable -n test"。
退出状态:
返回成功,除非 <名称> 不是一个 shell 内建,或者有错误发生。对算术表达式进行求值。
对 <表达式> 按照算术求值的规则进行求值。等价于 "let <表达式>"。
退出状态:
如果 <表达式> 求值结果为 0,则返回 1;否则返回 0。对算术表达式进行求值。
将每个 <参数> 作为算术表达式进行求值。求值在固定宽度的整数中完成,
没有溢出检测,不过除以 0 的异常会被捕获,并且会报一个错误。下面的运算符
列表中,同一行的运算符的优先级相等。列表按照优先级从高到低进行排序。
id++, id-- 变量的后缀自增、后缀自减
++id, --id 变量的前缀自增、前缀自减
-, + 一元负号、正号
!, ~ 逻辑和按位取反
** 指数
*, /, % 乘法、除法、取余数
+, - 加法、减法
<<, >> 按位左移、按位右移
<=, >=, <, > 比较
==, != 等于,不等于
& 按位与
^ 按位异或
| 按位或
&& 逻辑与
|| 逻辑或
expr ? expr : expr
条件运算符
=, *=, /=, %=,
+=, -=, <<=, >>=,
&=, ^=, |= 赋值
shell 变量允许作为操作数。变量的名称会被它的值替代(强制转换为固定
宽度的整数)。变量不需要打开 "整数" 属性就可以在表达式中使用。
运算符按照优先级顺序进行求值。括号中的子表达式将最先求值,
并可以覆盖上述优先级规则。
退出状态:
如果最后一个 <参数> 求值结果为 0,则 let 返回 1; 否则 let 返回 0。对条件表达式进行求值。
根据 <表达式> 的求值结果,以状态 0(真)或 1(假)退出。
表达式可以是一元的或者二元的。一元表达式通常用于检测文件状态。
同时还有字符串运算符和数值比较运算符。
test 的行为取决于参数的数量。请阅读 bash 手册页以获取完整的
说明文档。
文件运算符:
-a 文件 如果 <文件> 存在则为真。
-b 文件 如果 <文件> 为块特殊文件则为真。
-c 文件 如果 <文件> 为字符特殊文件则为真。
-d 文件 如果 <文件> 为目录则为真。
-e 文件 如果 <文件> 存在则为真。
-f 文件 如果 <文件> 存在且为普通文件则为真。
-g 文件 如果 <文件> 设置了 setgid 位则为真。
-h 文件 如果 <文件> 为符号链接则为真。
-L 文件 如果 <文件> 为符号链接则为真。
-k 文件 如果 <文件> 设置了粘滞位 (sticky bit) 则为真。
-p 文件 如果 <文件> 为命名管道则为真。
-r 文件 如果 <文件> 对您是可读的则为真。
-s 文件 如果 <文件> 存在且不为空则为真。
-S 文件 如果 <文件> 是套接字则为真。
-t FD 如果文件描述符 <FD> 已在一个终端上打开则为真。
-u 文件 如果 <文件> 设置了 setuid 位则为真。
-w 文件 如果 <文件> 对您是可写的则为真。
-x 文件 如果 <文件> 对您是可执行的则为真。
-O 文件 如果 <文件> 是被您(有效 uid)所有的则为真。
-G 文件 如果 <文件> 是被您的组(有效 gid)所有的则为真。
-N 文件 如果 <文件> 上次读取之后被修改过则为真。
文件1 -nt 文件2 如果 <文件1> 新于 <文件2> 则为真(根据修改日期)。
文件1 -ot 文件2 如果 <文件1> 旧于 <文件2> 则为真。
文件1 -ef 文件2 如果 <文件1> 是到 <文件2> 的硬链接则为真。
字符串运算符:
-z 字符串 如果 <字符串> 为空则为真。
-n 字符串
字符串 如果 <字符串> 不为空则为真。
字符串1 = 字符串2
如果两个字符串相等则为真。
字符串1 != 字符串2
如果两个字符串不相等则为真。
字符串1 < 字符串2
如果按字典序 <字符串1> 在 <字符串2> 之前则为真。
字符串1 > 字符串2
如果按字典序 <字符串1> 在 <字符串2> 之后则为真。
其他运算符:
-o 选项 如果指定的 shell 选项 <选项> 启用则为真。
-v 变量 如果指定的 shell 变量 <变量> 已设定则为真。
-R 变量 如果指定的 shell 变量 <变量> 已设定且为名称引用则为真。
! 表达式 如果 <表达式> 为假则为真。
表达式1 -a 表达式2
如果 <表达式1> 和 <表达式2> 都为真则为真。
表达式1 -o 表达式2
如果 <表达式1> 和 <表达式2> 中任何一个为真则为真。
参数1 运算符 参数2
算术测试。<运算符> 可以是 -eq、-ne、
-lt、-le、-gt 或 -ge 中的一个。
二元算术运算符返回真,如果 <参数1> 等于、不等于、小于、小于等于、
大于,或者大于等于 <参数2>。
退出状态:
如果 <表达式> 求值结果为真则返回成功;如果 <表达式> 求值结果为假,
或者使用了无效的参数,则返回失败。对条件表达式进行求值。
同 "test" 内建,但是最后一个参数必须是字符 "]",以匹配起始的 "["。执行一个简单命令或者显示命令的相关信息。
带 <参数> 运行 <命令> 且阻止 shell 函数查找流程,或显示指定的 <命令>
的信息。可以在已存在同名函数的情况下用于启动磁盘上的命令。
选项:
-p 使用 PATH 变量的一个默认值,以确保所有的标准工具都能被找到
-v 打印 <命令> 的描述,和 "type" 内建相似
-V 打印每个 <命令> 的更详细的描述
退出状态:
返回 <命令> 的退出状态,或者当找不到 <命令> 时则返回失败。将参数作为 shell 命令执行。
将 <参数> 组合成一个字符串,用结果作为 shell 的输入,并执行得到的命令。
退出状态:
返回命令的退出状态,或者在命令为空的情况下返回成功。只要测试仍然不成功,就执行命令。
只要 <命令> 中的最后一个命令的退出状态仍然不为 0,就展开并执行 <命令-2>。
退出状态:
返回最后一个执行的命令的状态。只要测试仍然成功,就执行命令。
只要 <命令> 中的最后一个命令的退出状态仍然为 0,就展开并执行 <命令-2>。
退出状态:
返回最后一个执行的命令的状态。根据条件执行命令。
执行 "if 命令" 列表。如果退出状态为零,则执行 "then 命令" 列表。
否则按顺序执行每个 "elif 命令" 列表,如果某一个的退出状态为零,则执行
对应的 "then 命令" 列表,然后 if 命令完成。否则,执行 "else 命令"
列表(如果有的话)。整个结构的退出状态是最后一个执行的命令的状态,
或者如果没有一个条件的测试结果为真,则退出状态为零。
退出状态:
返回最后一个执行的命令的状态。基于模式匹配来执行命令。
根据和 <词语> 匹配的 <模式> ,选择性地执行 <命令>。
"|" 用于分隔多个模式。
退出状态:
返回最后一个执行的命令的状态。为列表中的每个成员执行命令。
"for" 循环为列表中的每个成员执行一系列的命令。
如果没有 "in 词语 ...;" ,则假定使用 `in "$@"'。对于 <词语> 中的
每个元素,<名称> 被设定为该元素,然后执行 <命令>。
退出状态:
返回最后执行的命令的状态。在当前 shell 中执行一个文件中的命令。
在当前 shell 中读取并执行 <文件名> 中的命令。将使用 $PATH 变量中的
条目寻找包含 <文件名> 的目录。如果提供了 <参数>,则它们将成为
<文件名> 执行时的位置参数。
退出状态:
返回 <文件名> 中最后一个被执行的命令的状态;如果无法读取 <文件名>,
则返回失败。执行条件命令。
根据条件表达式 <表达式> 的求值结果返回状态 0 或 1。表达式的基本元素
与 "test" 内建相同,且可以通过下列运算符进行组合:
( 表达式 ) 返回 <表达式> 的值
! 表达式 如果 <表达式> 为假则为真,否则为假
表达式1 && 表达式2 如果 <表达式1> 和 <表达式2> 均为真则为真,
否则为假
表达式1 || 表达式2 如果 <表达式1> 和 <表达式2> 中任何一个为真
则为真,否则为假
当使用 "==" 和 "!=" 运算符时,运算符右边的字符串被视为模式,进行模式匹配。
当使用 "=~" 运算符时,运算符右边的字符串被视为正则表达式来进行匹配。
如果 <表达式1> 足够确定整个表达式的值,运算符 && 和 || 将不会对
<表达式2> 进行求值。
退出状态:
根据 <表达式> 的值返回 0 或 1。执行 shell 内建。
带 <参数> 执行 <shell-内建>,并且跳过命令查找流程。在希望以 shell 函数
的形式重新实现 shell 内建,并且希望在该函数中执行该 shell 内建的情况下
很有用。
退出状态:
返回 <shell-内建> 的退出状态,或者如果 <shell-内建> 不是一个 shell 内建
时返回假。退出 %d退出一个登录 shell。
退出一个登录 shell,退出状态为 N。如果不在登录 shell 中执行,
则返回一个错误。退出 for、while 或 until 循环。
退出一个 FOR、WHILE 或 UNTIL 循环。如果指定了 N,则跳出
从里往外数共 N 重循环。
退出状态:
退出状态为 0,除非 N 不大于等于 1。退出 shell。
退出 shell,退出状态为 N。如果 N 被省略,则退出状态为最后一个执行的
命令的退出状态。文件限制浮点异常在 <格式> 的控制下格式化并打印 <参数>。
选项:
-v 变量 将输出赋值给 shell 变量 <变量>,而不是将它显示在
标准输出上
FORMAT 是包含三种类型的对象的字符串:普通字符,会被简单地复制到标准输出;
字符转义序列,会在转义之后复制到标准输出;格式说明符,每个都会让 shell 打印
下一个多余的参数。
除了 printf(1) 中描述的标准格式说明符以外,printf 还可解析:
%b 展开对应参数中的反斜杠转义序列
%q 以可以重新用作 shell 输入的格式给参数加上引号
%Q 类似 %q,但是精度要求会在加引号之前对尚未加引号的参数生效
%(格式)T 将 <格式> 作为 strftime(3) 的格式字符串,并输出产生的
日期-时间字符串
有必要时,会重新使用格式串以消耗所有参数。如果参数的数量少于格式串要求
的数量,则视为将零值或空字符串(视情况而定)提供给了多余的格式说明符。
退出状态:
返回成功,除非使用了无效的选项,或者发生了写入或赋值错误。GNU bash,版本 %s (%s)
GNU bash,版本 %s-(%s)
GNU 长选项:
使用 GNU 软件的通用帮助:<http://www.gnu.org/gethelp/>
将命令组合为一个单元。
运行一个组中的命令集合。这是对整个命令集合进行重定向的方法之一。
退出状态:
返回最后一个执行的命令的状态。HFT 输入数据待处理已授予 HFT 监视模式已撤销 HFT 监视模式已完成 HFT 声音序列HOME 未设定挂断无名氏!I/O 就绪信息:非法指令信息请求中断已杀死许可证 GPLv3+:GNU GPL 许可证第三版或者更新版本 <http://gnu.org/licenses/gpl.html>
标记 shell 变量为不可改变。
标记每一个 <名称> 为只读;这些 <名称> 的值将不可以被后续的赋值操作
所改变。如果提供了 <值>,则在标记为只读之前将 <值> 赋给变量。
选项:
-a 所指代的是索引数组变量
-A 所指代的是关联数组变量
-f 所指代的是 shell 函数
-p 显示所有只读变量或者函数的列表,取决于是否提供了 -f 选项
参数 "--" 禁用后续的选项处理。
退出状态:
返回成功,除非使用了无效的选项,或者 <名称> 无效。修改或显示补全选项。
修改每个 <名称> 的补全选项,或者如果没有提供 <名称>,修改正在执行的补全的
选项。如果没有提供 <选项>,打印每个 <名称> 的补全选项或者当前的补全规约。
选项:
-o 选项 为每个 <名称> 设定补全选项 <选项>
-D 修改 "默认" (default) 命令的补全选项
-E 修改 "空" (empty) 命令的补全选项
-I 修改首个单词的补全选项
使用 "+o" 代替 "-o" 可以关闭指定的选项。
参数:
每个 <名称> 都对应一个之前已通过 "complete" 内建定义了补全规约的命令。
如果没有提供 <名称>,compopt 必须由当前正在生成补全的函数进行调用,
并且当前正在执行的补全生成器的选项会被修改。
退出状态:
返回成功,除非使用了无效的选项,或者 <名称> 没有定义补全规约。修改 shell 资源限制。
在允许此类控制的系统上,提供对于 shell 及其创建的进程可使用的资源的
控制。
选项:
-S 使用 "软" (soft) 资源限制
-H 使用 "硬" (hard) 资源限制
-a 报告当前的所有限制
-b 套接字缓冲区大小
-c 创建的核心文件的最大大小
-d 一个进程的数据段的最大大小
-e 调度优先级 (nice) 的最大值
-f shell 及其子进程可以写的最大文件大小
-i 可以挂起的最大信号数量
-k 分配给此进程的最大 kqueue 数量
-l 一个进程可以锁定的最大内存大小
-m 驻留集的最大大小
-n 打开的文件描述符的最大个数
-p 管道缓冲区大小
-q POSIX 消息队列的最大字节数
-r 实时调度的最大优先级
-s 最大栈大小
-t 最大的 CPU 时间,以秒为单位
-u 最大用户进程数
-v 虚拟内存大小
-x 文件锁的最大数量
-P 伪终端的最大数量
-R 实时进程阻塞前可运行的最大时间
-T 最大线程数量
并非所有选项都在所有系统上可用。
如果提供了 <限制>,则它将成为指定的资源的新的值;特殊的 <限制> 值为
"soft"、"hard" 和 "unlimited",分别表示当前的软限制、当前的硬限制,
以及无限制。否则,打印指定资源的当前限制值。如果未提供选项,则假定
为 -f。
限制值的单位都是 1024 字节,除了 -t 单位是秒,-p 单位是 512 字节,
-u 为未经缩放的进程数量。
退出状态:
返回成功,除非使用了无效的选项,或者有错误发生。将任务移至前台。
将以 <任务说明符> 指定的任务放至前台,使其成为当前任务。
如果没有给出 <任务说明符>,shell 观念中的当前任务将会被使用。
退出状态:
放至前台的命令的状态,或者当错误发生时则返回失败。将任务移至后台。
将以 <任务说明符> 指定的任务放至后台,就像它们是带 "&" 启动的一样。
如果没有给出 <任务说明符>,shell 观念中的当前任务将会被使用。
退出状态:
返回成功,除非任务控制没有启用,或者有错误发生。空的命令。
没有效果; 此命令不做任何操作。
退出状态:
总是成功。OLDPWD 未设定解析选项参数。
getopts 可在 shell 过程中使用,将位置参数解析为选项。
<选项字符串> 包含待识别的选项字母;如果一个字母后面跟着一个冒号,
则该选项需要一个参数,参数与选项之间应当用空格隔开。
每次被调用时,getopts 会将下一个选项放到 shell 变量 $<名称> 中,
如果 <名称> 变量不存在则先将其初始化,并将下一个待处理的参数的序号
放入 shell 变量 OPTIND 中。OPTIND 变量在每次 shell 或者 shell 脚本
启动时都被初始化为 1。当一个选项要求有一个参数时,getopts 将该参数
放入 shell 变量 OPTARG 中。
getopts 有两种报告错误的方法。如果 <选项字符串> 的第一个字符是
冒号,getopts 使用沉默错误报告。在此模式下,不会打印错误消息。
如果遇到了一个无效的选项,getopts 将找到的选项字符放入 OPTARG
变量中。如果没有找到必需的参数,getopts 放置一个 ":" 到 <名称>
变量中,并且将 OPTARG 变量设置为找到的选项字符。如果 getopts 不处于
沉默模式,并且遇到了一个无效的选项,getopts 放置 "?" 到 <名称> 变量
中并且取消设定 OPTARG 变量。如果没有找到必需的参数,一个 "?" 会被
放入 <名称> 变量中,OPTARG 将被取消设定,并且会打印一个诊断信息。
如果 shell 变量 OPTERR 的值为 0,getopts 会禁用错误信息的打印,
即使 <选项字符串> 的第一个字符不是冒号。OPTERR 的默认值为 1。
getopts 通常解析位置参数,不过如果在 <参数> 中提供了参数,则转而
解析它们。
退出状态:
如果找到了一个选项,则返回成功;如果遇到了选项的末尾或者有错误发生,
则返回失败。打印当前工作目录的名字。
选项:
-L 打印 $PWD 变量的值,如果它包含了当前的工作目录
-P 打印当前的物理目录,而不包含任何的符号链接
默认情况下,"pwd" 的行为和给定了 "-L" 时一致。
退出状态:
返回 0,除非使用了无效的选项,或者无法读取当前目录。退出从标准输入读取一行,并将其分割为不同的字段。
从标准输入读取单独的一行,或者如果使用了 -u 选项,从文件描述符 <FD> 中
读取。该行会被分割成字段,如同分割词语一样,并且第一个词被赋值给第一个
<名称>,第二个词被赋值给第二个 <名称>,以此类推,剩下所有的词被赋值给
最后一个 <名称>。只有 $IFS 中的字符会被视为词语分隔符。默认情况下,
反斜杠字符可以转义分隔符和换行符。
如果没有提供 <名称>,则读取的行被存放在 REPLY 变量中。
选项:
-a 数组 将词语按顺序赋值给 <数组> 变量的各个成员,索引从零开始
-d 分隔符 继续读取,直到遇到 <分隔符> 的第一个字符,而不是换行符
-e 使用 Readline 获取行
-i 文本 使用 <文本> 作为 Readline 的初始文字
-n 字符数 读取 <字符数> 个字符之后返回,而不是等到读取换行符。
但是如果读取了不到 <字符数> 个字符就遇到了分隔符,
则分隔符仍然生效
-N 字符数 仅在恰好读取了 <字符数> 个字符之后返回,除非遇到 EOF
或者读取超时。忽略所有的分隔符
-p 提示符 在尝试进行读取之前先输出 <提示符>(不加换行)
-r 不允许反斜杠转义任何字符
-s 不回显来自终端的输入
-t 超时 如果在 <超时> 秒内没有读取一个完整的行则超时并且返回失败。
默认的超时时间是 TMOUT 变量的值。<超时> 可以是小数。
如果 <超时> 是 0,read 会立即返回而不尝试读取任何数据,
且仅当可以从指定的文件描述符获取输入时,才返回成功。
如果超过了超时时间,则退出状态大于 128
-u fd 从文件描述符 <FD> 中读取,而不是标准输入
退出状态:
返回码为零,除非遇到了文件结束符、读取超时(此时返回码大于 128)、
发生了变量赋值错误,或者 -u 选项的参数中的文件描述符无效。从一个文件中读取行到数组变量中。
同 "mapfile"。从标准输入读取行到索引数组变量中。
从标准输入读取行到索引数组变量 <数组> 中,或者如果使用了 -u 选项,
从文件描述符 <FD> 中读取。默认的 <数组> 是 MAPFILE 变量。
选项:
-d 分隔符 使用 <分隔符> 而非换行符标志一行的结束
-n 计数 最多复制 <计数> 行。如果 <计数> 为 0,则复制所有行
-O 起始 从索引 <起始> 开始赋值给 <数组> 变量。默认索引是 0
-s 计数 丢弃最初读取的 <计数> 行
-t 从读取的每行末尾删除一个 <分隔符>(默认为换行符)
-u fd 从文件描述符 <FD> 中读取行,而不是标准输入
-C 回调 每读取 <间隔> 行之后对 <回调> 进行求值
-c 间隔 指定每次调用 <回调> 之前读取的行数
参数:
数组 存储文件数据使用的数组变量名
如果使用了 -C 而没有 -c,默认的间隔是 5000。当对 <回调> 进行求值时,
下一个将被赋值的数组元素的索引以及将被赋给那个元素的行会作为额外参数
被传递给它。
如果没有显式指定起始索引,mapfile 会在赋值前清空 <数组>。
退出状态:
返回成功,除非使用了无效的选项,或者 <数组> 为只读或不是索引数组。记录锁记住或显示程序位置。
确定并记住每个命令 <名称> 的完整路径名。
如果不提供参数,则显示已经记住的命令的信息。
选项:
-d 忘记每一个 <名称> 的已经记住的位置
-l 以可重新用作输入的格式显示
-p 路径名 使用 <路径名> 作为 <命令> 的完整路径名
-r 忘记所有已经记住的位置
-t 打印每一个 <名称> 的已经记住的位置,如果指定了多个
<名称>,则在每个位置前面加上对应的 <名称>
参数:
名称 会在 $PATH 中搜索每个 <名称>,并且添加到已经记住的命令
列表中。
退出状态:
返回成功,除非没有找到 <名称>,或者使用了无效的选项。从栈中删除目录。
从目录栈中删除条目。不带参数时,删除栈顶目录,并改变目录至新的栈顶目录。
选项:
-n 阻止从栈中删除目录时通常的改变目录操作,从而仅对栈进行操作。
参数:
+N 删除第 N 个目录("dirs" 显示的列表中左起,从零开始)。
例如:"popd +0" 删除第一个目录,"popd +1" 删除第二个。
-N 删除第 N 个目录("dirs" 显示的列表中右起,从零开始)。
例如:"popd -0" 删除最后一个目录,"popd -1" 删除倒数第二个。
"dirs" 内建可以显示目录栈。
退出状态:
返回成功,除非使用了无效的参数,或者改变目录失败。从已定义的别名列表中删除每一个 <名称>。
选项:
-a 删除所有的别名定义
返回成功,除非 <名称> 不是一个已存在的别名。从当前 shell 中删除任务。
从活动任务列表中删除每一个 <任务说明符> 参数。不带任何 <任务说明符>
时,shell 使用它的观念中的当前任务。
选项:
-a 如果不提供 <任务说明符>,则删除所有任务
-h 标记每个 <任务说明符> 对应的任务,从而当 shell 接收到 SIGHUP
信号时不发送 SIGHUP 给指定任务
-r 仅删除运行中的任务
退出状态:
返回成功,除非使用了无效的选项或者 <任务说明符>。从目录栈中删除条目。不带参数时,删除栈顶目录,并改变目录至新的栈顶目录。
选项:
-n 阻止从栈中删除目录时通常的改变目录操作,从而仅对栈进行操作。
参数:
+N 删除第 N 个目录("dirs" 显示的列表中左起,从零开始)。
例如:"popd +0" 删除第一个目录,"popd +1" 删除第二个。
-N 删除第 N 个目录("dirs" 显示的列表中右起,从零开始)。
例如:"popd -0" 删除最后一个目录,"popd -1" 删除倒数第二个。
"dirs" 内建可以显示目录栈。使用指定命令替换 shell。
执行 <命令>,以指定的程序替换这个 shell。以 <参数> 作为 <命令> 的参数。
如果没有指定 <命令>,则任何的 <重定向> 都在当前 shell 中生效。
选项:
-a 名称 将 <名称> 作为第 0 个参数传递给 <命令>
-c 在一个空的环境中执行 <命令>
-l 在 <命令> 的第 0 个参数中放置一个短横线 (-)
如果无法执行命令,则退出一个非交互式的 shell,除非设定了 shell 选项
"execfail"。
退出状态:
返回成功,除非未找到 <命令>,或者出现一个 <重定向> 错误。报告流水线执行消耗的时间。
执行 <流水线> 并且打印 <流水线> 终止时消耗的真实时间、用户 CPU 时间
和系统 CPU 时间的总结。
选项:
-p 用可移植的 POSIX 格式打印用时总结。
使用 TIMEFORMAT 变量的值作为输出格式。
退出状态:
返回状态是 <流水线> 的返回状态。继续 for、while 或 until 循环。
继续进行当前 FOR、WHILE 或 UNTIL 循环的下一次迭代。
如果指定了 N, 则继续进行从里往外数第 N 重循环的下一次迭代。
退出状态:
退出状态为 0,除非 N 不大于等于 1。在前台继续任务。
等价于向 "fg" 命令传递 <任务说明符> 参数。继续一个已停止的任务或
后台任务。<任务说明符> 可以是任务名称或任务编号。在 <任务说明符>
后加上一个 "&" 会把任务放至后台,就像该任务说明符被作为 "bg" 的参数
执行一样。
退出状态:
返回被继续的任务的状态。返回一个成功的结果。
退出状态:
总是成功。返回一个不成功的结果。
退出状态:
总是失败。从一个 shell 函数返回。
使一个函数或者被 source 的脚本退出,返回值为 N。如果 N 被
省略,则返回状态为函数或脚本中最后一个被执行的命令的返回状态。
退出状态:
返回 N,或者如果 shell 不在执行一个函数或脚本时,返回失败。返回当前子例程调用的上下文。
不带有 <表达式> 时,返回 "$line $filename"。带有 <表达式> 时,
返回 "$line $subroutine $filename";这个额外的信息可以用来提供
栈跟踪 (stack trace)。
<表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。
退出状态:
返回 0,除非 shell 不在执行一个 shell 函数,或者 <表达式> 无效。返回当前子例程调用的上下文。
不带有 <表达式> 时,返回 "$line $filename"。带有 <表达式> 时,
返回 "$line $subroutine $filename";这个额外的信息可以用来提供
栈跟踪 (stack trace)。
<表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。运行中段错误从列表中选取词并且执行命令。
<词语> 被展开,生成一个词语列表。展开后的词语集合被打印到
标准错误,每个词语前面打印一个数字。如果没有 "in 词语" ,则假定
使用 `in "$@"'。然后,会显示一个 PS3 提示符,并且从标准输入读取
一行。如果该行是所显示的词之一所对应的数字,则 <名称> 被设定为
相应的词。如果该行为空,则会重新显示 <词语> 和提示符。如果读到了
EOF,则命令完成。读入任何其他的值会导致 <名称> 变量被设定为空。
读入的行被存放在变量 REPLY 中。<命令> 会在每次选择之后被执行,
直到执行到 break 命令。
退出状态:
返回最后一个执行的命令的状态。向一个任务发送一个信号。
向以 <PID> 或者 <任务说明符> 指定的进程发送一个以 <信号说明符> 或
<信号编号> 指定的信号。如果没有指定 <信号说明符> 和 <信号编号>,
那么假定发送 SIGTERM 信号。
选项:
-s 信号 <信号> 是信号名称
-n 信号 <信号> 是信号编号
-l 列出所有信号名称;如果 "-l" 后有参数,则假定它们是信号编号,
并列出对应的信号名称
-L 同 -l
kill 成为 shell 内建有两个理由:它允许使用任务 ID 代替进程 ID,
并且在您可以创建的进程数达到上限时仍可以杀死进程。
退出状态:
返回成功,除非使用了无效的选项,或者有错误发生。设定 Readline 键绑定和变量。
绑定一个键序列到一个 Readline 函数或者宏,或者设定一个
Readline 变量。非选项参数的语法和 ~/.inputrc 文件的语法相同,
但是必须以单一参数的形式传递给 bind,
例如,bind '"\C-x\C-r": re-read-init-file'。
选项:
-m 键映射 在此命令执行过程中使用指定的 <键映射>。可被接受的
键映射名称有 emacs、emacs-standard、emacs-meta、
emacs-ctlx、vi、vi-move、vi-command 和 vi-insert。
-l 列出函数名称。
-P 列出函数名称和绑定。
-p 以可以重新用作输入的格式列出函数名称和绑定。
-S 列出可以启动宏的键序列以及它们的值。
-s 以可以重新用作输入的格式列出可以启动宏的键序列
以及它们的值。
-V 列出变量名称以及它们的值。
-v 以可以重新用作输入的格式列出变量名称以及它们的值。
-q 函数名 查询指定的函数可以由哪些键启动。
-u 函数名 解除绑定所有绑定至指定函数的键。
-r 键序列 取消 <键序列> 的绑定。
-f 文件名 从 <文件名> 中读取键绑定。
-x 键序列:shell-命令 当 <键序列> 被输入时,执行 <shell-命令>。
-X 以可以重新用作输入的格式列出用 -x 绑定的键序列和命令。
退出状态:
bind 返回 0,除非使用了无法识别的选项,或者有错误发生。设定和取消设定 shell 选项。
改变每个 shell 选项 <选项名> 的设定。不带选项时,列出每个提供的
<选项名>,或者如果没有提供 <选项名> 时,列出所有 shell 选项,同时
标注每一个选项是否被设定。
选项:
-o 限制 <选项名>,只使用可被 "set -o" 设置的选项
-p 打印每个 shell 选项并标注它的状态。
-q 阻止输出
-s 启用(设定)每个 <选项名>
-u 禁用(取消设定)每个 <选项名>
退出状态:
如果 <选项名> 被启用则返回成功;如果使用了无效的选项,或者 <选项名>
被禁用,则返回失败。为 shell 变量设定 "导出" 属性。
标记每个 <名称>,将其自动导出到后续执行的命令的环境。
如果提供了 <值>,则导出前将其赋值为 <值>。
选项:
-f 所指代的是 shell 函数
-n 删除每个 <名称> 的 "导出" 属性
-p 显示所有导出的变量和函数的列表
参数 "--" 禁用后续的选项处理。
退出状态:
返回成功,除非使用了无效的选项,或者 <名称> 无效。设定或取消设定 shell 选项和位置参数的值。
改变 shell 属性和位置参数的值,或者显示 shell 变量的名称和值。
选项:
-a 标记修改的或者创建的变量为导出变量。
-b 在任务终止时立即进行通知。
-e 如果一个命令以非零状态退出,则立即退出。
-f 禁用文件名生成(通配符匹配)。
-h 查找命令时记住它们的位置。
-k 所有的赋值参数都会进入命令的环境,而不仅仅是命令名称
之前的参数。
-m 启用任务控制。
-n 读取命令但不执行。
-o 选项名
设定与 <选项名> 对应的变量:
allexport 与 -a 相同
braceexpand 与 -B 相同
emacs 使用 emacs 风格的行编辑界面
errexit 与 -e 相同
errtrace 与 -E 相同
functrace 与 -T 相同
hashall 与 -h 相同
histexpand 与 -H 相同
history 启用命令历史
ignoreeof shell 读取到 EOF 时不会退出
interactive-comments
允许交互式命令中出现注释
keyword 与 -k 相同
monitor 与 -m 相同
noclobber 与 -C 相同
noexec 与 -n 相同
noglob 与 -f 相同
nolog 目前可接受,但会被忽略
notify 与 -b 相同
nounset 与 -u 相同
onecmd 与 -t 相同
physical 与 -P 相同
pipefail 流水线的返回值是最后一个以非零状态退出的命令的退出
状态,或者如果没有命令以非零状态退出,则返回零。
posix 改变 bash 中默认操作和 Posix 标准不同的行为,
以符合标准
privileged 与 -p 相同
verbose 与 -v 相同
vi 使用 vi 风格的行编辑界面
xtrace 与 -x 相同
-p 只要真实用户 ID 和有效用户 ID 不匹配时就会被打开。
禁用对 $ENV 文件的处理以及 shell 函数的导入。关闭此选项
会导致有效 uid 和 gid 被设定为真实 uid 和 gid。
-t 读取并执行一个命令之后退出。
-u 替换时将未设定的变量视为错误。
-v 读取 shell 输入行时将其打印。
-x 执行命令时打印命令及其参数。
-B shell 会执行大括号展开。
-C 设定之后,禁止以重定向输出的方式覆盖普通文件。
-E 设定之后,ERR 陷阱会被 shell 函数继承。
-H 启用 ! 风格的历史替换。当 shell 是交互式的时候这个标志默认打开。
-P 设定之后,当执行会改变当前目录的命令,例如 cd 时,不解析符号链接。
-T 设定之后,DEBUG 和 RETURN 陷阱会被 shell 函数继承。
-- 将所有剩余的参数赋值给位置参数。
如果没有剩余的参数,则取消设定位置参数。
- 将所有剩余的参数赋值给位置参数。
关闭 -x 和 -v 选项。
使用 + 而不是 - 会关闭标志。标志也可以在 shell 被启动时使用。当前已设定的
标志可以在 $- 变量中找到。剩余的 n 个 <参数> 是位置参数,并且会被按顺序
赋值给 $1, $2, .. $n。如果没有给定 <参数>,则打印所有的 shell 变量。
退出状态:
返回成功,除非使用了无效的参数。设定变量的值和属性。
同 "declare"。参见 "help declare"。设定变量的值和属性。
声明变量并且赋予它们属性。如果没有给定 <名称>,
则显示所有变量的属性和值。
选项:
-f 限制仅操作或显示函数的名称和定义
-F 限制仅显示函数名称(以及调试时显示行号和源文件名)
-g 在 shell 函数内部使用时创建全局变量;否则忽略
-I 当创建局部变量时,继承上一个作用域的同名变量的属性和值
-p 显示每个 <名称> 的属性和值
设定属性的选项:
-a 使 <名称> 成为索引数组(如果支持)
-A 使 <名称> 成为关联数组(如果支持)
-i 使 <名称> 带有 "整数" (integer) 属性
-l 将 <名称> 的值在赋值时转换为小写
-n 使 <名称> 成为一个对以它的值为名称的变量的引用
-r 将 <名称> 变为只读
-t 使 <名称> 带有 "跟踪" (trace) 属性
-u 使 <名称> 的值在赋值时转换为大写
-x 将 <名称> 导出
用 "+" 代替 "-" 会关闭指定的属性。
带有 "整数" 属性的变量被赋值时将使用算术求值(见 "let" 命令)。
在函数中使用时,"declare" 使 <名称> 成为局部变量,和 "local"
命令一致。"-g" 选项阻止此行为。
退出状态:
返回成功,除非使用了无效的选项,或者发生变量赋值错误。匹配关键字 "Shell 选项:
移位位置参数。
将位置参数 $N+1,$N+2 ... 重命名为 $1,$2 ...。如果没有给定 N,
则假定 N 为 1。
退出状态:
返回成功,除非 N 为负数或者大于 $#。信号 %d指定 Readline 如何补全参数。
指定对于每一个 <名称> 如何补全参数。如果不带选项,现有的补全规约会以
可以重新用作输入的格式打印出来。
选项:
-p 以可重用的格式打印现有的补全规约
-r 对每一个 <名称> 删除补全规约,或者,如果没有提供 <名称> ,
删除所有的补全规约
-D 设定默认的补全和动作,给没有定义补全规约的命令使用
-E 对于 "空" (empty) 命令设定补全动作 -- 对于空行的补全
-I 将补全和动作应用在首个单词(通常是所给命令)上
尝试补全时,按照上述大写字母选项的顺序进行动作。如果给出了多个选项,
-D 选项优先级高于 -E 选项,且这两个选项优先级均高于 -I。
退出状态:
返回成功,除非使用了无效的选项,或者有错误发生。已停止已停止(信号)已停止(tty 输入)已停止(tty 输出)已停止(%s)挂起 shell 的执行。
挂起此 shell 的执行,直到它收到 SIGCONT 信号。
登录 shell 不可以被挂起,除非强制执行。
选项:
-f 强制挂起,即使此 shell 是登录 shell。
退出状态:
返回成功,除非没有启用任务控制,或者有错误发生。时间格式:"%c": 无效的格式字符已终止%s 中的邮件已被读过
有运行中的任务。
有已停止的任务。
在法律许可的情况下特此明示,本软件不提供任何担保。这些 shell 命令是内部定义的。输入 "help" 以获取本列表。
输入 "help 名称" 以得到有关函数 "名称" 的更多信息。
使用 "info bash" 来获得关于 shell 的更多一般性信息。
使用 "man -k" 或 "info" 来获取不在本列表中的命令的更多信息。
名称旁边的星号 (*) 表示该命令被禁用。
本软件是自由软件,您可以自由地更改和重新发布。为信号和其他事件设置陷阱。
定义并激活当 shell 接收到信号或满足其他条件时执行的处理程序。
<参数> 是当 shell 接收到 <信号说明符> 时读取和执行的命令。如果
没有指定 <参数>(并且只给出一个 <信号说明符>)或者 <参数> 为 "-",
则每一个指定的信号会被重置为原始值。如果 <参数> 是空字符串,则每一个
<信号说明符> 会被 shell 和它启动的命令忽略。
如果一个 <信号说明符> 是 EXIT (0),则 <参数> 会在 shell 退出时被执行。
如果一个 <信号说明符> 是 DEBUG,则 <参数> 会在每一个简单命令之前执行。
如果一个 <信号说明符> 是 RETURN,则 <参数> 会在每一个 shell 函数或者
通过 . 或 source 内建执行的脚本执行结束时被执行。如果一个 <信号说明符>
是 ERR,则 <参数> 会在命令返回失败,并且假如启用了 -e 选项,本次失败就
会导致 shell 退出的情况下被执行。
如果不提供参数,trap 打印与每一个信号相关联的命令列表。
选项:
-l 打印信号名称以及和它们对应的编号的列表
-p 打印与每个 <信号说明符> 相关联的陷阱命令
每一个 <信号说明符> 可以是 <signal.h> 中的信号名称或者信号编号。信号名称
是大小写敏感的,并且 SIG 前缀是可选的。可以使用 "kill -信号 $$" 给 shell
发送信号。
退出状态:
返回成功,除非使用了无效的 <信号说明符>,或者无效的选项。请输入 `%s -c "help set"' 以获得关于 shell 选项的更多信息。
请输入 `%s -c help' 以获得关于 shell 内建命令的更多信息。
未知信号 #%d未知错误未知状态取消设定 shell 变量和函数的值和属性。
对于每一个 <名称>,删除对应的变量或函数。
选项:
-f 将每个 <名称> 视为 shell 函数
-v 将每个 <名称> 视为 shell 变量
-n 将每个 <名称> 视为名称引用,并取消设定该变量本身,而不是
其引用的变量
不带选项时,unset 首先尝试取消设定一个变量,如果失败,再尝试取消设定
一个函数。
某些变量不可以被取消设定;参见 "readonly"。
退出状态:
返回成功,除非使用了无效的选项,或者 <名称> 为只读。紧急 I/O 状况用法: %s [GNU 长选项] [选项] ...
%s [GNU 长选项] [选项] 脚本文件 ...
使用 "%s" 退出 shell 。
请使用 "bashbug" 命令来报告程序错误。
请将翻译错误报告到 <i18n-zh@googlegroups.com>。
用户信号 1用户信号 2等待任务完成并返回退出状态。
等待以 <ID> 指定的进程,其中 <ID> 可以是进程 ID 或者任务说明符,
并报告它的终止状态。如果没有指定 <ID> ,则等待当前活跃的所有子
进程,并且返回状态为零。如果 <ID> 是任务说明符,则等待该任务的
流水线中的所有进程。
若给定了 -n 选项,从 <ID> 列表中等待单个任务完成,或者,
如果没有提供 <ID>,等待下一个任务完成并返回其退出状态。
若给定了 -p 选项, 被返回退出状态的任务的进程 ID 或任务 ID 将被赋值
给选项的参数指定的 <变量>。该变量会首先被取消设定,然后才会进行赋值。
该选项只有和 -n 选项同时使用时才有用。
若给定了 -f 选项,且启用了任务控制,则等待指定的 <ID> 终止,
而不是等待它改变状态。
退出状态:
返回最后一个 <ID> 的状态;如果使用了无效的 <ID> ,或者使用了无效的
选项,或者给定了 -n 选项但 shell 没有尚未等待的子进程,则失败。等待进程完成并且返回退出状态。
等待以 <PID> 指定的进程并报告它的终止状态。如果没有提供 <PID>,则等待当前
所有活跃的子进程,并且返回码为零。<PID> 必须为进程 ID。
退出状态:
返回最后一个 <PID> 的状态;如果 <PID> 无效,或者使用了无效的选项,则失败。窗口已改变将参数写到标准输出。
在标准输出上显示 <参数>,后面跟一个换行。
选项:
-n 不要追加换行
退出状态:
返回成功,除非有写入错误发生。将参数写到标准输出。
在标准输出上显示 <参数>,以空格隔开,后面跟一个换行。
选项:
-n 不要追加换行
-e 启用对下列反斜杠转义字符的解释
-E 显式地阻止对反斜杠转义字符的解释
"echo" 对下列反斜杠转义字符进行解释:
\a 警报(响铃)
\b 退格
\c 阻止后续的输出
\e 转义字符
\E 转义字符
\f 换页
\n 换行
\r 回车
\t 水平制表符
\v 垂直制表符
\\ 反斜杠
\0nnn ASCII 码为 NNN(八进制)的字符。NNN 可以是 0 至 3 位的八进制数。
\xHH 值为 HH(十六进制)的 8 位字符。HH 可以是一至两位的十六进制数。
\uHHHH 值为 HHHH(十六进制)的 Unicode 字符。HHHH 可以是一至四位的
十六进制数。
\UHHHHHHHH 值为 HHHHHHHH(十六进制)的 Unicode 字符。
HHHHHHHH 可以是一至八位的十六进制数。
退出状态:
返回成功,除非有写入错误发生。您在 $_ 中有邮件您在 $_ 中有新邮件[ 参数... ][[ 表达式 ]]"%c": 错误的命令"%c": 无效的格式字符"%c": 无效的符号模式字符"%c": 无效的符号模式运算符"%c": 指定的时间格式无效"%s": 无法解除绑定"%s": 无法解除绑定命令键映射"%s": 无效的别名"%s": 无效的键映射名"%s": 名称引用变量引用的变量名无效"%s": 是特殊内建"%s": 缺少格式字符"%s": 不是一个 pid 或有效的任务说明符"%s": 不是有效的标识符"%s": 未知的函数名需要 ")"需要 ")",却找到 %s条件表达式需要 ":"add_process: pid %5ld (%s) 标记为仍存活alias [-p] [名称[=值] ... ]all_local_variables: 当前作用域中没有函数上下文参数需要参数需要数组变量支持尝试给非变量赋值数组下标不正确错误的命令类型错误的条件连接符错误的跳转错误的替换:在 %s 中没有右 "`"错误的替换:在 %2$s 中没有右 `%1$s'bash 主页:<http://www.gnu.org/software/bash>
bash_execute_unix_command: 无法找到命令的键映射bg [任务说明符 ...]bgp_delete: LOOP: psi (%d) == storage[psi].bucket_nextbgp_search: LOOP: psi (%d) == storage[psi].bucket_nextbind [-lpvsPSVX] [-m 键映射] [-f 文件名] [-q 名称] [-u 名称] [-r 键序列] [-x 键序列:shell-命令] [键序列:readline-函数 或 readline-命令]大括号展开:无法为 %s 分配内存大括号展开:为 %u 个元素分配内存失败大括号展开:为 "%s"分配内存失败break [n]bug: 错误的表达式赋值记号builtin [shell-内建 [参数 ...]]caller [表达式]只能在函数或者被 source 的脚本中使用 "return"只能在函数中使用无法从文件描述符 %d 为 bash 的输入分配一个新的文件描述符无法为立即文档创建临时文件:%s无法复制文件描述符 %d 到文件描述符 %d无法将命名管道 %s 作为文件描述符 %d 复制无法在共享目标 %2$s 中找到 %1$s:%3$s无法为命令替换创建子进程无法为进程替换创建子进程无法为命令替换创建管道无法为进程替换创建管道无法打开命名管道 %s 进行读取无法打开命名管道 %s 进行写入无法打开共享目标 %s:%s无法从 /dev/null 重定向标准输入:%s无法为文件描述符 %d 重置 nodelay 模式无法同时设定和取消设定 shell 选项无法将 gid 设为 %d:有效 gid %d无法设定终端进程组 (%d)无法将 uid 设为 %d:有效 uid %d无法同时取消设定一个函数和一个变量无法启动调试器;调试模式已禁用无法挂起无法挂起一个登录 shell无法用 "-f" 生成函数最多只能使用 -anrw 选项中的一个case 词语 in [模式 [| 模式]...) 命令 ;;]... esaccd [-L|[-P [-e]] [-@]] [目录]子进程 setpgid(%ld 到 %ld)command [-pVv] 命令 [参数 ...]命令替换:忽略输入中的 null 字节command_substitute: 无法将管道复制为文件描述符 1compgen [-abcdefgjksuv] [-o 选项] [-A 动作] [-G 全局模式] [-W 词语列表] [-F 函数] [-C 命令] [-X 过滤模式] [-P 前缀] [-S 后缀] [词语]complete [-abcdefgjksuv] [-pr] [-DEI] [-o 选项] [-A 动作] [-G 全局模式] [-W 词语列表] [-F 函数] [-C 命令] [-X 过滤模式] [-P 前缀] [-S 后缀] [名称 ...]补全:未找到函数 "%s"compopt [-o|+o 选项] [-DEI] [名称 ...]需要二元条件运算符continue [n]coproc [名称] 命令 [重定向]无法找到 /tmp,请创建!cprintf: "%c": 无效的格式字符当前declare [-aAfFgiIlnrtux] [名称[=值] ...] 或 declare -p [-aAfFilnrtux] [名称 ...]删除进程组 %2$ld 中已停止的任务 %1$ddescribe_pid: %ld: 无此 pid目录栈为空目录栈索引dirs [-clpv] [+N] [-N]disown [-h] [-ar] [任务说明符 ... | pid ...]除以 0动态加载不可用echo [-n] [参数 ...]echo [-neE] [参数 ...]空的数组变量名enable [-a] [-dnps] [-f 文件名] [名称 ...]获取终端属性时出错:%s导入 "%s" 的函数定义时出错设定终端属性时出错:%seval [参数 ...]eval: 超出最大 eval 嵌套层数 (%d)exec [-cl] [-a 名称] [命令 [参数 ...]] [重定向 ...]execute_coproc: 副进程 [%d:%s] 仍然存在exit [n]需要 ")"指数小于 0export [-fn] [名称[=值] ...] 或 export -p需要表达式超出表达式递归层数上限fc [-e 编辑器名] [-lnr] [起始] [终止] 或 fc -s [模式=替换串] [命令]fg [任务说明符]文件描述符超出范围需要文件名参数for (( 表达式1; 表达式2; 表达式3 )); do 命令; donefor 名称 [in 词语 ... ] ; do 命令; done进程复制 (fork) 产生的 pid %d 出现在运行中的任务 %d 中格式解析出现问题:%sfree: 调用时用了已经释放的块作为参数free: 调用时用了未分配的块作为参数free: 起始和末尾组块大小不一致free: 检测到下溢;magic8 损坏free: 检测到下溢;mh_nbytes 超出范围function 名称 { 命令 ; } 或 name () { 命令 ; }未来版本的 shell 会强制求值为算术替换getcwd: 无法访问父目录getopts 选项字符串 名称 [参数 ...]hash [-lr] [-p 路径名] [-dt] [名称 ...]已禁用哈希help [-dms] [模式 ...]帮助在当前版本中不可用立即文档在第 %d 行被文件结束符分隔(需要 "%s")history [-c] [-d 偏移量] [n] 或 history -anrw [文件名] 或 history -ps 参数 [参数...]历史位置历史说明符命中 命令
前缀自增或前缀自减运算符之后需要标识符if 命令; then 命令; [ elif 命令; then 命令; ]... [ else 命令; ] fiinitialize_job_control: getpgrp 失败initialize_job_control: 行规则initialize_job_control: 后台无任务控制initialize_job_control: setpgid无效的算术底数无效的底数%2$s 的 exportstr 中有无效的字符 %1$d无效的十六进制数无效的整数常数无效的数字无效的八进制数无效的信号编号在不带任务控制的情况下启动了任务 %d任务说明符 [&]jobs [-lnprs] [任务说明符 ...] 或 jobs -x 命令 [参数]kill [-s 信号说明符 | -n 信号编号 | -信号说明符] pid | 任务说明符 ... 或 kill -l [信号说明符]上一个命令:%s
let 参数 [参数 ...]限制第 %d 行:未启用行编辑%s 的加载函数返回失败 (%d):未加载local [选项] 名称[=值] ...注销
logout [n]循环计数make_here_document: 错误的指令类型 %dmake_local_variable: 当前作用域中没有函数上下文make_redirection: 重定向指令 "%d" 超出范围malloc: 空闲列表中的块损坏malloc: 断言失败:%s
mapfile [-d 分隔符] [-n 计数] [-O 起始] [-s 计数] [-t] [-u fd] [-C 回调] [-c 间隔] [数组]超出最大立即文档计数迁移进程至另一个 CPU缺少 ")"缺少 "]"使用了 \x 但缺少十六进制数使用了 \%c 但缺少 unicode 数不支持网络操作%s 的 exportstr 中没有 "="%2$s 中没有右 `%1$c'未找到命令没有与 "%s" 匹配的帮助主题。尝试使用 "help help" 或 "man -k %s" 或 "info %s"。无任务控制此 shell 中无任务控制无匹配:%s无其他目录其他选项不能与 "-x" 同时使用当前未在执行补全函数不是登录 shell:使用 "exit"空值目录八进制数仅在 "for"、"while" 或者 "until" 循环中有意义管道错误pop_scope: shell_variables 的头部不是临时环境作用域pop_var_context: shell_variables 的头部不是函数上下文pop_var_context: 没有 global_variables 上下文popd [-n] [+N | -N]即将停电在交互式 shell 中将忽略美化输出模式print_command: 错误的条件连接符 "%d"printf [-v var] 格式 [参数]progcomp_insert: %s: COMPSPEC 为 NULLprogrammable_completion: %s: 可能的重试循环编程错误pushd [-n] [+N | -N | 目录]pwd [-LP]read [-ers] [-a 数组] [-d 分隔符] [-i 文本] [-n 字符数] [-N 字符数] [-p 提示符] [-t 超时] [-u fd] [名称 ...]读取错误:%d: %sreadarray [-d 分隔符] [-n 计数] [-O 起始] [-s 计数] [-t] [-u fd] [-C 回调] [-c 间隔] [数组]readonly [-aAf] [名称[=值] ...] 或 readonly -prealloc: 调用时用了未分配的块作为参数realloc: 起始和末尾组块大小不一致realloc: 检测到下溢;magic8 损坏realloc: 检测到下溢;mh_nbytes 超出范围递归栈下溢重定向错误:无法复制文件描述符register_alloc: %p 已在表中显示为已分配?
register_alloc: 使用 FIND_ALLOC 时分配表已满?
register_free: %p 已在表中显示为未分配?
受限return [n]run_pending_traps: 错误的 trap_list[%d] 值:%prun_pending_traps: 信号处理程序是 SIG_DFL,重新发送 %d (%s) 给自己save_bash_input: 新的文件描述符 %d 的缓冲区已存在select 名称 [in 词语 ... ;] do 命令; doneset [-abefhkmnptuvxBCEHPT] [-o 选项名] [--] [-] [参数 ...]setlocale: %s: 无法改变区域设置 (%s)setlocale: %s: 无法改变区域设置 (%s):%ssetlocale: LC_ALL: 无法改变区域设置 (%s)setlocale: LC_ALL: 无法改变区域设置 (%s):%sshell 层数 (%d) 太高,重置为 1shell_getc: shell_input_line_size (%zu) 超过 SIZE_MAX (%lu):行已被截断shift [n]移位次数shopt [-pqsu] [-o] [选项名 ...]sigprocmask: %d: 无效的操作source 文件名 [参数]start_pipeline: 进程组管道suspend [-f]语法错误条件表达式中有语法错误条件表达式中有语法错误:未预期的记号 "%s"表达式中有语法错误变量赋值中有语法错误"%s" 附近有语法错误未预期的记号 "%s" 附近有语法错误语法错误:未预期的 "%s"语法错误:"((%s))"语法错误:未预期的 ";"语法错误:需要算术表达式语法错误:无效的算术运算符语法错误:需要操作数语法错误:未预期的文件结束符系统即将崩溃test [表达式]time [-p] 流水线参数太多trap [-lp] [[参数] 信号说明符 ...]trap handler: 超出最大的 trap handler 层数 (%d)trap_handler: 错误的信号 %dtype [-afptP] 名称 [名称 ...]typeset [-aAfFgiIlnrtux] 名称[=值] ... 或 typeset -p [-aAfFilnrtux] [名称 ...]ulimit [-SHabcdefiklmnpqrstuvxPRT] [限制]umask [-p] [-S] [模式]unalias [-a] 名称 [名称 ...]寻找 "]]" 时遇到了未预期的 EOF寻找匹配的 `%c' 时遇到了未预期的 EOF寻找匹配的 ")" 时遇到了未预期的 EOF二元条件运算符使用了未预期的参数 "%s"一元条件运算符使用了未预期的参数 "%s"二元条件运算符使用了未预期的参数一元条件运算符使用了未预期的参数条件命令中有未预期的记号 %d条件命令中有未预期的记号 "%c"条件命令中有未预期的记号 "%s"未预期的记号 "%s",需要二元条件运算符未预期的记号 "%s",需要 ")"未知未知的命令错误unset [-f] [-v] [-n] [名称 ...]until 命令; do 命令-2; done值对于底数而言过大variables - 一些 shell 变量的名称和含义wait [-fn] [-p 变量] [id ...]wait [pid ...]wait: pid %ld 不是当前 shell 的子进程wait_for: 没有进程 %ld 的记录wait_for_job: 任务 %d 已停止waitchld: 打开 WNOHANG 以避免无限阻塞警告:警告:%s: %s警告:-C 选项可能不像您预期的那样工作警告:-F 选项可能不像您预期的那样工作while 命令; do 命令-2; done写入错误:%sxtrace fd (%d) != fileno xtrace fp (%d)xtrace_set: %d: 无效的文件描述符xtrace_set: 文件指针为 NULL{ 命令 ; }