Skip to content

Instantly share code, notes, and snippets.

@suplo
Created June 14, 2017 02:42
Show Gist options
  • Save suplo/964e07e54f2d7acebffaa05cfcb08fe2 to your computer and use it in GitHub Desktop.
Save suplo/964e07e54f2d7acebffaa05cfcb08fe2 to your computer and use it in GitHub Desktop.
exec code
#!/usr/bin/env bash
# execute command
$@
# check status
STATUS=$?
if [ $STATUS == 0 ]; then
echo "Command '$@' completed successfully"
else
echo "Command '$@' exited with error status $STATUS"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment