Browsing Chinese (Simplified) translation

517 of 547 results
517.
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[tab]print a list of signal names and their corresponding numbers
-p[tab]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.
[tab] represents a tab character. Please write it exactly the same way, [tab], in your translation.
There are line breaks here. Each one represents a line break. Start a new line in the equivalent position in the translation.
There are leading/trailing spaces here. Each one represents a space character. Enter a space in the equivalent position in the translation.
为信号和其他事件设置陷阱。

定义并激活当 shell 接收到信号或满足其他条件时执行的处理程序。

<参数> 是当 shell 接收到 <信号说明符> 时读取和执行的命令。如果
没有指定 <参数>(并且只给出一个 <信号说明符>)或者 <参数> 为 "-",
则每一个指定的信号会被重置为原始值。如果 <参数> 是空字符串,则每一个
<信号说明符> 会被 shell 和它启动的命令忽略。

如果一个 <信号说明符> 是 EXIT (0),则 <参数> 会在 shell 退出时被执行。
如果一个 <信号说明符> 是 DEBUG,则 <参数> 会在每一个简单命令之前执行。
如果一个 <信号说明符> 是 RETURN,则 <参数> 会在每一个 shell 函数或者
通过 . 或 source 内建执行的脚本执行结束时被执行。如果一个 <信号说明符>
是 ERR,则 <参数> 会在命令返回失败,并且假如启用了 -e 选项,本次失败就
会导致 shell 退出的情况下被执行。

如果不提供参数,trap 打印与每一个信号相关联的命令列表。

选项:
-l[tab]打印信号名称以及和它们对应的编号的列表
-p[tab]打印与每个 <信号说明符> 相关联的陷阱命令

每一个 <信号说明符> 可以是 <signal.h> 中的信号名称或者信号编号。信号名称
是大小写敏感的,并且 SIG 前缀是可选的。可以使用 "kill -信号 $$" 给 shell
发送信号。

退出状态:
返回成功,除非使用了无效的 <信号说明符>,或者无效的选项。
Translated by Wenbin Lv
EXIT and DEBUG should be as-is. Use before you translate, please. The -signal is only an example; Read carefully.
Located in builtins.c:1365
517 of 547 results

This translation is managed by Ubuntu Simplified Chinese Translators, assigned by Ubuntu Translators.

You are not logged in. Please log in to work on translations.