Getting syntax error near unexpected token `fi' while executing below code. below is the output:-
: command not founde 2:
: command not founde 7:
run_billing.sh: line 22: syntax error near unexpected token `fi'
'un_billing.sh: line 22: `fi
The script is:
#!/bin/sh
#
# main
#
NARGS=$#
if [ $NARGS -lt 2 ]
then
echo "$PRG_NAME: error: incorrect number of arguments ($NARGS)";
echo "Usage: $PRG_NAME [Time]";
echo "Time format - pin_virtual_time format. e.g:- 062000002015.00";
echo "Example: sh run_billing.sh 062000002015.00";
exit 1
fi
if [ $NARGS -eq 2 ]
then
echo "Run Billing script - pin_bill_day";
pin_virtual_time -m2 $1;
pin_bill_day;
fi