How to make `trap` know if the EXIT is after successful program finish or because of premature as an error or...
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
2
1
PROBLEM: I have a shell program that I have been writing but I can't find out how to make sure that trap is trapping for cleanup at the end or because of a error in some command, it cleans up either way. Here is the code: ################################### Successful exit then this cleanup ###########################################################3 successfulExit() { IFS=$IFS_OLD cd "$HOME" || { echo "cd $HOME failed"; exit 155; } rm -rf /tmp/svaka || { echo "Failed to remove the install directory!!!!!!!!"; exit 155; } } ############################################################################...