CONFIG_FILE="${HOME}/sample/seq.cfg"
count=`awk 'END {print NR}' $CONFIG_FILE`
echo $count
t=1
while [ "$t" -le "$count" ]
do
output_var=`awk -v v1=$t '$1 ~ /v1/ { print $1 }' $CONFIG_FILE`
input_var=`awk -v v1=$t '$1 ~ /v1/ { print $3 }' $CONFIG_FILE`
echo "O=" $output_var
echo "I=" $input_var
done
the above code is giving blank values for output_var and input_var ??
Can someone tell me why it is not assigning values to it.
the config file is as follows :
1 = 4
2 = 2
3 = 9
4 = 87
5 = 6