echo $# gives you the number of arguments passed into your #bash script. With if [ $# -lt n ] you can ensure your script is called properly