bash if check function parameter value code example
Example 1: verify parameter one bash
if [ -z "$1" ]
then
echo "No argument supplied"
fi
Example 2: check if variable is a number in bash
re='^[0-9]+$'
if ! [[ $yournumber =~ $re ]] ; then
echo "error: Not a number" >&2; exit 1
fi