On 5/1/06, Jon Drews <[EMAIL PROTECTED]> wrote: > The problem here robert is that sort is confused by the fields. That > is x\tfig2 has to become x\tfig02. Here I use the sort on 02. > > $ print 'x\tfig17\nx\tfig02\nx\tfig19\n' | sort -k 2.4,2.5 > > x fig02 > x fig17 > x fig19 > > I believe that when it tries to sort fig2 it interperts the next > "field" as a white space.
Hello Robert: Alternatively you can use an underscore to separate the numbers and specify that to be the field separator. $ print 'x\tfig_17\nx\tfig_2\nx\tfig_19\nx\tfig_10234' | sort -t _ -n -k2 x fig_2 x fig_17 x fig_19 x fig_10234 -- Kind regards, Jon _______________________________________________ CWE-LUG mailing list [email protected] http://www.cwelug.org/ http://www.cwelug.org/archives/ http://www.cwelug.org/mailinglist/
