Software >> OS >> Unix >> Linux >> Shell >>  How to write bash script with fixed number of arguments

Example for two arguments #!/bin/bash if [ $# -eq 2 ] then # This part will do the actual processing someothercommand.sh else # This part will inform user of the syntax expected echo echo "usage: myscript.sh <arg1> <arg2>" echo fi

Deals @yubeshop.com