joeroe3380
MIS
HI Gurus!!
I have written thie basic script..
awk '{for(i=0;i<=NR;i++) count=i}'< ${fileip} # count no of lines in fileip#
export env count
echo $count
case ${findsp} in
"r") export env sp="6" ;;
"m") export env sp="2" ;;
"l") export env sp="2" ;;
*) print "\n\n Warning - ASSIGNMENT CANNOT BE DETRMINED \n\n" ;;
if ( $count % $sp == 0)
then (sp_diff = $count / $sp )
export env sp_diff
fi
but i am repeatedly getting an error as:
if ( testx.ksh[168]: syntax error at line 176 : `(' unexpected
Also, is my assignment right in the awk statement. Im not familiar with unix but have got to do it for this particular chunk of my asisgnment.
Please advice on the above error.
Thank you in advance.
I have written thie basic script..
awk '{for(i=0;i<=NR;i++) count=i}'< ${fileip} # count no of lines in fileip#
export env count
echo $count
case ${findsp} in
"r") export env sp="6" ;;
"m") export env sp="2" ;;
"l") export env sp="2" ;;
*) print "\n\n Warning - ASSIGNMENT CANNOT BE DETRMINED \n\n" ;;
if ( $count % $sp == 0)
then (sp_diff = $count / $sp )
export env sp_diff
fi
but i am repeatedly getting an error as:
if ( testx.ksh[168]: syntax error at line 176 : `(' unexpected
Also, is my assignment right in the awk statement. Im not familiar with unix but have got to do it for this particular chunk of my asisgnment.
Please advice on the above error.
Thank you in advance.