scy, 1 month ago Friendly reminder that #!/bin/sh set -e is better than #!/bin/sh -e because the latter stops working when you do "sh script.sh" instead of "./script.sh". #Unix #CLI #ShellScripting #shell #bash
Friendly reminder that
#!/bin/sh set -e
is better than
#!/bin/sh -e
because the latter stops working when you do "sh script.sh" instead of "./script.sh".
#Unix #CLI #ShellScripting #shell #bash
vogelchr, 1 month ago @scy even better: set -euo pipefail Catches undefined variables and failures within a pipe.
@scy even better:
set -euo pipefail
Catches undefined variables and failures within a pipe.
Add comment