** OT : awk works only for first line

From: A Joshi <ajoshi977_at_yahoo.com>
Date: Tue, 27 Jan 2009 16:25:43 -0800 (PST)
Message-ID: <339705.66289.qm_at_web57512.mail.re1.yahoo.com>


   I am trying awk to get the first word from each line in a file : I am doing :

BEGIN {   FS=":"


{print $1}

For the first line : it prints the first work. For other lines it prints other words also. I tried to put in FS as space but that did not help. Can someone help? I did try google but could only find example like above. Thanks for help.       

Received on Tue Jan 27 2009 - 18:25:43 CST

Original text of this message