Quote:
how to check the number of parameters that user passes to script. when number of them don't match to the desired number, script should be interupted.
|
Unless I've missed something, you have not mentioned which language your script is in. colucix's reply assumes Bash (and Perl ???)
In any case, almost every language stores the args in an array, of which you can easily check the length of. Be sure to subtract 1 from this if you are using a language that also stores the script name.