DEV Community

Discussion on: Shell Scripts Matter

Collapse
 
panta82 profile image
panta82

Excellent advice all around.

shellcheck is a winner.

I'd also add, split your script into functions and do most of the work inside "main" or similar func. That makes it cleaner which parts of the code are synchronously executed and which are functionality to be called later (an alternative to the subshell () advice above).