Conversation
Notices
-
whats some good practices for a bash script in a professional environment?
i think i have the functional stuff done and while it runs (takes a while) im thinking how to make it better.
longterm it is supposed to run unattended
-
@grillchen bit like asking for good practices on drunk driving in a professional environment. why write bash scripts?
-
@lain now i wanna drive drunk in a server room. is there a mario kart server map?
-
@grillchen if you restrict your drunk driving to mario kart, i approve
-
well it's possible it's just painful
set -eu
make sure you trap signals and work around bash bugs like this:
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
drink your ovaltine and try not to cry yourself to sleep too much