Skip to content

Instantly share code, notes, and snippets.

@rafaelmaeuer
Last active July 20, 2023 14:11
Show Gist options
  • Save rafaelmaeuer/fe2fb6af4dbee0791195ded8de2f7b4c to your computer and use it in GitHub Desktop.
Save rafaelmaeuer/fe2fb6af4dbee0791195ded8de2f7b4c to your computer and use it in GitHub Desktop.
# variable $# is the number of input arguments
if [ $# -eq 0 ]
then
echo "No arguments supplied"
fi
# check if an argument is an empty string or not
if [ -z "$1" ]
then
echo "No argument supplied"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment