[Linux-disciples] Ctrl+C and scripts

Stephen R Laniel steve at laniels.org
Fri Jan 6 10:56:35 EST 2006


If you send Ctrl+C (SIGINT, I guess more specifically) to a
script, it seems as though Ctrl+C only stops the running
process. So if, for instance, your script is

#!/bin/sh
sudo apt-get update
sudo apt-get upgrade

and you press Ctrl+C while the update is running, the script
will continue on to the upgrade and you'll need to press
Ctrl+C again.

If you want the SIGINT to interrupt the whole script, how
would you do that?

-- 
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20060106/5a03f871/attachment.pgp


More information about the Linux-disciples mailing list