[K12OSN] OT: bash help

Les Mikesell les at futuresource.com
Tue Aug 7 19:55:00 UTC 2007


Peter Hartmann wrote:
> I'm stumped on this one.  I need to do a sort uniq on a csv file but
> only by comparing the first field.  Little help?
> 

sort -u -k1,1 -t,

The character following the t is your field separator.  I'm not sure if 
you always get the first or last of the lines that match in the 1st 
field - better check that if it matters.

-- 
   Les Mikesell
    les at futuresource.com




More information about the K12OSN mailing list