Skip to content

Instantly share code, notes, and snippets.

@brianoflan
Created March 6, 2017 17:50
Show Gist options
  • Save brianoflan/c3b1c008c5e0bdf9f1f48772e95ff716 to your computer and use it in GitHub Desktop.
Save brianoflan/c3b1c008c5e0bdf9f1f48772e95ff716 to your computer and use it in GitHub Desktop.
a verbose execute() kind of script
#!/bin/bash
say_and_do() {
echo "$@" 1>&2 ;
"$@" ;
local e=$? ;
echo "Exit code = $e" 1>&2 ;
echo ;
return $e ;
}
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment