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


#!/bin/bash
ARGS=2
if [ $# -lt $ARGS ]
then
   echo "you passed $# parameters"
   echo "Usage: `basename replacebegin:content:replaceend` arg1 arg2"
exit
fi
arg1=
arg2=
# continue processing with $arg1 and $arg2