[SWLUG] Awk is driving me MAD!

Dick Porter dick at acm.org
Tue Jun 10 17:05:00 UTC 2003


On Tue, 2003-06-10 at 17:34, Terry John wrote:
> Try
> 
> awk '{printf("%s",$2); printf(" IN A "); print $1}' /etc/hosts

or: awk '{printf("%s IN A %s\n", $2, $1);}' /etc/hosts 

The original (awk '{print $2 " IN A " $1}' /etc/hosts) works for me,
though :)

- Dick






More information about the Swlug mailing list