From: Johan Holmberg Date: 2002-03-12T06:55:43+09:00 Subject: Re: Using 'uniq' question On Tue, 12 Mar 2002, Ed Baker wrote: > > If I have an array of data, where each record looks like the example > below the cut line, how could I do a "uniq" sort based only on the > first column. > > ===========================cut line ======================== > 100788 1000 1538 > 100791 1000 1505 > 100791 1000 1520 > 100792 1000 1698 > 100792 1000 5215 > 100802 1000 1088 > 100808 1000 1094 > 100827 1000 1516 > 100829 1000 1115 > 100830 1000 1115 > 100891 1000 1398 > 100895 1000 1115 > Does it have to involve Ruby ? Or would the following command be OK ? $ sort -u +0 -1 YOUR-FILE /Johan Holmberg