trampas de salida de Redsymbol.net

#!/bin/bash
function finish {
  # Your cleanup code here
}
trap finish EXIT
Horrible Hamster