After the trap has been set, define two variables to ease the typing later in the script.
在设置了陷阱之后,定义两个变量以便稍后在脚本中键入时使用。
You also need to be able to trap errors and output from programs and ensure the security and validity of the environment in which the script executes.
还需要能够跟着错误和程序输出,并需要能够确保脚本的执行环境的安全性和有效性。
The trap command prevents the script from being interrupted by the user (by pressing control-C during boot, for example) while the script executes.
trap命令防止用户在脚本执行时中断(例如,在引导时键入control - c)脚本。
A message displays containing the line number and command when the trap was caught; the script then exits (from the exit command on the trap command list).
在捕捉到trap后,会显示一条包含行号和命令的消息;脚本随后将退出执行(使用trap命令列表中的exit命令)。
A message displays containing the line number and command when the trap was caught; the script then exits (from the exit command on the trap command list).
在捕捉到trap后,会显示一条包含行号和命令的消息;脚本随后将退出执行(使用trap命令列表中的exit命令)。
应用推荐