Created
January 3, 2017 13:44
-
-
Save nuada/099c079b56fba2e7efbf544f238a9697 to your computer and use it in GitHub Desktop.
Test if script was called with some flag.
This file contains hidden or 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
#!/bin/bash | |
if [[ " $* " =~ ' flag ' ]]; then | |
echo "Flag is present" | |
else | |
echo "Flag is missing" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment