Skip to content

Instantly share code, notes, and snippets.

@Offirmo
Last active September 25, 2017 12:35
Show Gist options
  • Save Offirmo/f7495d3ff7883c59b442625ac0cf4557 to your computer and use it in GitHub Desktop.
Save Offirmo/f7495d3ff7883c59b442625ac0cf4557 to your computer and use it in GitHub Desktop.
[Basic Bash script] #bash
#!/usr/bin/env bash
## https://stackoverflow.com/questions/31313305/portably-trapping-err-in-shell-script
## http://mywiki.wooledge.org/BashFAQ/105
set -o errexit
## current shell can be tested with this:
## https://stackoverflow.com/a/11097703/587407
echo "* current shell : '`ps -p $$ -ocomm=`'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment