[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] OT: bash help



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 futuresource com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]