root@cnode04-m:~# ./test.sh a bThe number of arguments is: 2failroot@cnode04-m:~# ./test.sh a b cThe number of arguments is: 3successgoing... root@cnode04-m:~# cat test.shecho "The number of arguments is: $#" if [ $# -eq 3 ]then echo "success"else echo "fail" exitfi echo "going..."