How to check for an argument in a script in Bash.
if [ -z "$1" ] ; then echo "there are no arguments" else echo "there is an argument" fi |
cloud engineer
How to check for an argument in a script in Bash.
if [ -z "$1" ] ; then echo "there are no arguments" else echo "there is an argument" fi |
if [ -z "$1" ] ; then echo "there are no arguments" else echo "there is an argument" fi