Skip to content

Instantly share code, notes, and snippets.

@kourge
Created July 22, 2016 18:18
Show Gist options
  • Select an option

  • Save kourge/b196c5a7aa2a956531956c9f3de9462e to your computer and use it in GitHub Desktop.

Select an option

Save kourge/b196c5a7aa2a956531956c9f3de9462e to your computer and use it in GitHub Desktop.
wraps around `test` and echoes "true" or "false" depending on exit status
#!/bin/sh
test "$@"
RESULT=$?
if [[ $RESULT -eq 0 ]]; then
echo true
else
echo false
fi
exit $RESULT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment