Tidying up temp files on exit of script

Hi

I believe there is a method to remove all temporary files when a KSH script terminates (either expectedly or unexpectedly).

I think is some sort of subroutine you can create that runs when the script exits. Can anyone help me with this please?

Many thanks
Helen :confused:

You need to use the trap command

see www.shelldorado.com for a good explanation of this.

Thanks for your help Kevin :slight_smile: