Cleanup on bash script exit


function cleanup()
{
    # ...
}

trap cleanup EXIT

source

Tags:  bash

Share: