New Eyes on an awk script

Shawn Tayler stayler
Mon Nov 15 22:19:02 PST 2004


This got it!  Thanks Kurt!

On Mon, 15 Nov 2004 09:55:13 -0500 Kurt Wall <kwall at kurtwerks.com>
exclaimed:

> You've got a a typo somewhere. This script:
> 
> --- cut ---
> BEGIN { FS = "," }
> { 
>   ++x
>   if (NF == 9) { print
>   x","$1","$2","$3","$4","$5","$6","$7","$8","$9",NA"
> }
>   if ((NF == 10) && ($9 == $10)) { print
>   x","$1","$2","$3","$4","$5","$6","$7","$8","$9",NA" } if ((NF == 10) &&
>   ($9 != $10)) { print
>   x","$1","$2","$3","$4","$5","$6","$7","$8","$9","$10 } if (NF == 8) {
>   print x","$1","$2","$3","$4","$5","$6","$7","$8", , " } 
> }


More information about the Linux-users mailing list