Return to Snippet

Revision: 58891
at August 8, 2012 07:54 by triffel


Initial Code
E_WRONG_ARGS=85
script_parameters="-a -h -m -z"
# -a = all, -h = help, etc.
if [ $# -ne $Number_of_expected_args ]
then
   echo "Usage: `basename $0` $script_parameters"
   # `basename $0` is the script's filename.
   exit $E_WRONG_ARGS
fi

Initial URL

                                

Initial Description
Tests whether the script has been invoked with the correct number of parameters.

Initial Title
Correct Number of Parameters

Initial Tags
Bash, unix, linux

Initial Language
Bash