Capturing a ^C to break out of a script?

Kurt Wall kwall
Mon May 17 11:33:58 PDT 2004


Also sprach James McDonald:
>
> Umm I was wondering if there is anyway of breaking out of a script by 
> capturing the CTRL+C combination and completey exiting the script I am

You should be able to use the trap builtin (if you're using bash).

Kurt
-- 
Anti-trust laws should be approached with exactly that attitude.



More information about the Linux-users mailing list