Forcing cleanup code in shell scripts?

Josh ChaitinPollak josh at offthehill.org
Thu Nov 3 13:05:24 EST 2005


On Nov 3, 2005, at 1:01 PM, Gordon Marx wrote:

> On 03/11/05, Josh ChaitinPollak <josh at offthehill.org> wrote:
>
>> Is it possible to trap Ctrl-C and run some cleanup code in a shell
>> script? How would I do that?
>>
>
> Our script dude says "use trap". You should really look into getting a
> script dude, they're awesome to have around when you CBA. :--)

Nathan, Gordon,

Thanks for the tips, it seems to be working great!



More information about the Discuss mailing list