考虑:
$cat b.sh #!/bin/bash trap 'echo $$was interrupted' INT read foo echo done $./b.sh ^C27104 was interrupted ^C27104 was interrupted ^C27104 was interrupted done $
(ctrl-c被击中3次,然后是ctrl-d)@H_502_4@