I'm not an experienced programmer. I decidied to teach myself awk. I have a file with a list of records that has several fields and i'm trying to change the value of 1 field with a number that increases for each successive record; ie - record 1 $4 = 249, record 2 $4 =250, record 3 $4 =251.....etc. below is one of my many iterations. I've tried including the 'next' and 'continue' statements but nothing works. I can not get the program to increment to the next record with out the 'for' statement completing it's cycle for each record.
BEGIN { FS="[/:,=]" }
{ for ( lno=249; lno<=259 ; lno++ )
$4==lno
print $0 }
END { print NR }
BEGIN { FS="[/:,=]" }
{ for ( lno=249; lno<=259 ; lno++ )
$4==lno
print $0 }
END { print NR }