[PLUG] An awk-ward Question

Rich Shepard rshepard at appl-ecosys.com
Tue Mar 22 21:21:54 UTC 2011


On Tue, 22 Mar 2011, Fred James wrote:

> Try 'printf' instead of print ...
>
> {printf 
> "%s:%s:%s:%s\n%s:%s:%s:%s:%s\n%s:%s:%s:%s:%s\n%s:%s:%s:%s:%s\n",$1,$2,$3,$4,$5,$1,$2,$6,$7,$8,$1,$2,$9,$10,$11,$1,$2,$12,$13,$14}
>
> ... if I haven't miscounted or something,  And yes, I treated all values as 
> strings, although that may not be what you want/have to do.

Fred,

   As was pointed out to me replacing the single quotes with double quotes
and adding double quotes to the newlines fixed the problem. I've been
working with SQL as I get these data in the table and got turned around on
when to use single quotes and when to use double quotes.

Thanks,

Rich





More information about the PLUG mailing list