I have the following bash compound command:
while true ; do slow-command-one ; slow-command-two ; slow-command-three ; done
What happens:
- When I press Ctrl+C at any point, the entire command is aborted.
What I want to happen:
- When I press Ctrl+C during execution of
slow-command-two,slow-command-twoshould be aborted, and execution should continue withslow-command-three. - When I press Ctrl+C at any other time, the entire command should be aborted (as now).
How do I get this to happen?
SIGINT. – Ignacio Vazquez-Abrams Nov 5 '10 at 11:03