How to make `trap` know if the EXIT is after successful program finish or because of premature as an error or something
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 …