Skip to content

Basics

Check existence of argument

if [ $# -eq 0 ]
# if no arguments supplied

OR

if [ "$#" -eq 0 ] || [ "$#" -ge 2 ] 
# if number of arguments is 0 or greater than equal to 2