Catch Ctrl+C (Interrupted Signal)
Posted: Thu Aug 20, 2015 6:57 am
Is there any way to catch a Ctrl+C and clean up before exiting a script?
I tried:
But that didn't work - when you interrupt the command with Ctrl+C while it's running, there is no output.
Any proper way to do it?
I tried:
Code: Select all
do { :delay 2 } on-error={ :put "Test" }
Any proper way to do it?