How to check existence of input argument in a Linux bash shell script?

You can use $# to check the number of arguments passed to your script. To access individual arguments, use $1 for the 1st argument, $2 for the second argument so on and so forth.

Leave a Reply