Rich Shepard wrote:
> 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
>   
Rich Shepard
Good ... yes that will work as well, as long as you can keep track of 
when to escape these special characters (quotes, for example).
However ... since you are working with SQL to extract the data in the 
first place, you could just format the data as required and skip the AWK 
step altogether, could you not?
Regards
Fred James

_______________________________________________
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to