** OT : awk works only for first line

  • From: A Joshi <ajoshi977@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 27 Jan 2009 16:25:43 -0800 (PST)

Hi,


   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. 




      

Other related posts: