Re: a two-level 'sort' question

subPlanck_at_excite.com
Date: 03/29/05


Date: 29 Mar 2005 09:13:37 -0800


Bill Seivert wrote:
> >
> >>I'm stuck trying to sort a long list of files in the form:
> >>
> >>Feb 24 13:50 060399_20a08.124
> >>Feb 22 12:06 060399_20a09.035
> >>Feb 22 12:06 060399_20a09.034
> >>
> >>whereby the entries are first sorted/grouped by
> >>sort -t_ -d -k 2.1,2.5
> >>and each block is sorted in an ascending order by date.
[...]
> Try:
> sort -t_ -d -k 2.1,2.5 -k 1.1M,1.3 -k 1.5n,1.6 -k 1.7n,1.8 -k
1.10n,1.11
> -k 1.14n,1.19

This works the way I wanted it to work, thanks, but what made 'sort'
change its separator from an underscore to a space in the M term? What
are the separator change/cancellation rules in 'sort'? Can't find it
in the man pages...

z.entropic



Relevant Pages

  • Re: hex constant
    ... inserted between adjacent digits of a bit string literal does not ... This is the sort of thing I should have known YEARS ago. ... Rob Gaddi, Highland Technology ... or end with underscore, and can't have more than one underscore in a ...
    (comp.lang.vhdl)
  • Importing Multiple Text Files
    ... after the underscore, to put that in one column as well. ... Each text file contains only an article of some sort and ... 1001_1 and 1001_2 would basically contain different bodies of the same ... segregated in different colums, eg: ...
    (alt.php)
  • Re: Cant get current omnibus .ra files ?
    ... Not only did they change the day and time around and insert an underscore, ... they also removed the categorisation component in the path. ... is always the otehr way round so that you can sort. ...
    (uk.media.radio.archers)
  • Re: C# code to sort by alphanumeric
    ... It would make the reason for the sort order you ... The underscore ... The default sort order weights different characters differently. ... If you want more details, you might be able to find something useful there (though, maybe not since the irate fellow didn't seem to). ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: output from cut command
    ... I still wouldn't bother with the pipe to sort though since ... > it's trivial to just use awk to print the unique lines, ... The for will produce the unique records but they are not ... Bill Seivert ...
    (comp.unix.questions)