a two-level 'sort' question
subPlanck_at_excite.com
Date: 03/25/05
- Next message: Barry Margolin: "Re: a two-level 'sort' question"
- Previous message: Kevin Collins: "Re: how to retrieve the header information from a html page ???"
- Next in thread: Barry Margolin: "Re: a two-level 'sort' question"
- Reply: Barry Margolin: "Re: a two-level 'sort' question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Mar 2005 13:24:21 -0800
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.
man sort gives the following example to sort
30 December
23 MAY
25 June
10 June
sort -k 2M -k 1n
but I want to keep sorted blocks after the undersore as priority
blocks.
The way I see it, the problem is in having to switch filed separators,
an underscore and space, in the same sort expresasion. Can it be done?
I'd appreciate any suggestions, because none of my attempts have been
successful.
z.entropic
- Next message: Barry Margolin: "Re: a two-level 'sort' question"
- Previous message: Kevin Collins: "Re: how to retrieve the header information from a html page ???"
- Next in thread: Barry Margolin: "Re: a two-level 'sort' question"
- Reply: Barry Margolin: "Re: a two-level 'sort' question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|