cmccabe
1
In the gawk
below, I am trying to output the file tab-deliminated but don't think that is the correct syntax. Thank you :).
gawk OFS='/t' '{sub(/-[0-9]+/,"",$2); ar[$2]=$0}
END{n = asort(ar)
for (i = 1; i <= n; i++)
print ar}' file
Aia
2
OFS='\t'
---------- Post updated at 10:46 AM ---------- Previous update was at 10:42 AM ----------
Note: Do you mean ORS?
1 Like
cmccabe
3
Thank you very much OFS='\t'
was what I was doing wrong