Argc and Argv in Bash [duplicate] Argc and Argv in Bash [duplicate] shell shell

Argc and Argv in Bash [duplicate]


Ok, try like this

define a variable ARGC=$#

and you if statement will look like

if [ $ARGC -ne $MAX_ARGS ]; then

Legend:

-ne = not equal

-gt = greater than

-eq = equal to