bash check if input exiss code example
Example 1: verify parameter one bash
if [ -z "$1" ]
then
echo "No argument supplied"
fi
Example 2: bash if set variable
if [ -z "$var" ]; then echo "var is blank"; else echo "var is set to '$var'"; fi