The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-01-2007
RacerX's Avatar
RacerX RacerX is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 38
Looks like you did not specify a Field Separator just the Output Field Separator you wanted. Sorry i don't have gawk but in Awk is this close to what you were trying to do?
Code:
awk 'BEGIN {FS = ","; OFS="\t"} data { print $1, $2, $3} /@data/ {data = 1} ' ~/Desktop/datainput.txt > ~/Desktop/test.txt

OUTPUT RETURNED:
-1.170815	0.257522	0.016416
-1.335653	0.30494	    0.009793
-1.227306	0.300442	0.024001