Created
July 2, 2018 16:29
-
-
Save linknum23/4829354182c2f631c5bf0720bc6dcc50 to your computer and use it in GitHub Desktop.
exit or return in bash, handles sourced and direct execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# parameter tests | |
if [ INSERT_TEST_HERE ] ; then | |
return 2>/dev/null || exit | |
fi | |
# do real stuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment