Created
November 25, 2017 23:48
-
-
Save fhuitelec/acccb30398879102d0a94447a81264cf to your computer and use it in GitHub Desktop.
[Check argument is provided] #zsh #cheatsheet
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
#!/usr/bin/env zsh | |
# | |
# Check argument is provided | |
# | |
if [ -n "$1" ]; then | |
echo "Command must have one argument" >&2 | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment