Reputation: 303
I was going over some files and found this:
if [[ $# -ge 1 ]]
What does that mean?
Upvotes: 12
Views: 40815
Reputation: 179
In shell script $# stores the number of arguments passed from the command line, like *argc in c programming.
So, By using the "if" statement we are verify the number of arguments are greater than or equal to one.
Upvotes: 5
Reputation: 40971
if the number of passed parameters is greater than or equal to 1
Upvotes: 19