[SWLUG] Awk is driving me MAD!

Tim Bonnell Tim.Bonnell at CarringtonWire.com
Tue Jun 10 16:16:26 UTC 2003


I'm implementine a DNS server. Everything seems to be working.

Now its time to convert my lengthy hosts file into a DNS file.

I tried this simple line:

# awk '{print $2 " IN A " $1}' hosts

and it just wont work!

# awk '{print $1 " IN A " $2}' hosts
# awk '{print $1 " IN A " $1}' hosts
# awk '{print $2 " IN A " $2}' hosts

all work, but thats no use to me. I basically need to swap the fields around
with a bit of text between.

Go on, tell me what a pratt I'm being!


Regards,	Tim

+------------------------------------------------+
| Tim.Bonnell at CarringtonWire.com                 |
| IT Manager - Carrington Wire Cardiff           |
| PO Box 56, Pengam Works, Cardiff CF24 2WR      |
| Tel:+44(0) 29 20256100 Fax:+44(0) 29 20256101  |
| www.CarringtonWire.com                         |
+------------------------------------------------+


****** Internet Email Confidentiality ****** 
Privileged/Confidential Information may be contained in this message.  If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone. In such case, you should destroy this message and kindly
notify the sender by reply email. Please advise immediately if you or your
employer do not consent to Internet email for messages of this kind. 

Opinions, conclusions and other information in this message that do not
relate to the official business of Carrington Wire Ltd shall be understood
as neither given nor endorsed by it. 
********************************************




More information about the Swlug mailing list