Dear friends,
please tell me how to pass the external variable values to the nawk command.
length=`expr $len2 - $len1`
i need to pass $length to following nawk command as mentioned below.
nawk '{if((x=index($0,"W/X"))>0){id=substr($0,x, $length);print x;print id;}}' filename1
but I am getting follwing error,
nawk: illegal field $()
input record number 1, file filename1
source line number 1
please tell me how to pass the $length value to the nawk .
waiting for ur reeply....
swamymns