如果我trap两次发出内置命令 [对于相同的信号],会发生什么?第二个命令是添加到第一个命令中,还是替换第一个命令?
trap
trap Foo SIGINT ... trap Bar SIGINT ...
当 SIGINT 发生时,Bash 是直接运行Bar还是同时运行Foo?或者是其他东西...?
Bar
Foo
shell bash trap
bash ×1
shell ×1
trap ×1