[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Global results order
From: |
Jason Hood |
Subject: |
Re: Global results order |
Date: |
Sat, 04 Apr 2015 17:50:27 +1000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 3/04/2015 18:32, Jason Hood wrote:
> On 2/04/2015 22:16, Pavel Nedev wrote:
>> 2 - Are the global search results supposed to be ordered by file name?
>
> Try piping to `sort -V` (if your sort supports version sorting).
If it doesn't (native GNU sort on DOS/Windows seem to be old), use `-t: -k1,1
-k2n` (if using absolute paths on DOS/Windows, make it `-k1,2 -k3n`). Windows
sort won't work (line numbers will be like 1-10-2); the old DOS CWSORT & RPSORT
don't define a field separator (so you'll get 10-1-2); don't think I've come
across anything else. Of course, having GLOBAL grep sort it itself would be
better, but it looks like it would actually be a bit of effort, which wouldn't
be worth it.
--
Jason.