Re: [SLUG] date sorting on second last string

2012-08-10 Thread Glen Turner
On 2012-08-06 Jobst Schmalenbach trolled: Dear I say it ... Excel does a good job at this. Export as csv, import into Excel, select the column and sort. That won't give the result you want, due the varying number of columns in each record. If you fix that then the sort command can trivially

Re: [SLUG] date sorting on second last string

2012-08-10 Thread lists
On Fri, August 10, 2012 11:36 pm, Glen Turner wrote: Glen, thanks Unix is a set of tools which you string together. that;s exactly what my friend Rod kept telling me awk '{ printf %s %s\n, $(NF-1), $0 }' fred.txt | sort -t '-' -k 3n -k 2n -k 1n | cut -f 2- -d ' ' puurfect, thanks! On Fri,

Re: [SLUG] date sorting on second last string

2012-08-05 Thread Jobst Schmalenbach
Dear I say it ... Excel does a good job at this. Export as csv, import into Excel, select the column and sort. J On Fri, Aug 03, 2012 at 09:12:14AM +1000, li...@sbt.net.au (li...@sbt.net.au) wrote: I have a wget /sed/awk shell script that fetches page and emails, the resulting format is

Re: [SLUG] date sorting on second last string

2012-08-05 Thread peter
Jobst == Jobst Schmalenbach jo...@barrett.com.au writes: Jobst Dear I say it ... Excel does a good job at this. Export as Jobst csv, import into Excel, select the column and sort. Can you do that programatically? Peter C -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/

Re: [SLUG] date sorting on second last string

2012-08-05 Thread Nick Andrew
On Fri, Aug 03, 2012 at 09:12:14AM +1000, li...@sbt.net.au wrote: how could I date order sort on penultimate string to end up with date ordered ? Job 1978924 (8) Ttt Pp 20-11-2012 Notes Job 1923886 Ccc Pl 31-08-2012 Notes That kind of thing is much easier done if dates are

[SLUG] date sorting on second last string

2012-08-02 Thread lists
I have a wget /sed/awk shell script that fetches page and emails, the resulting format is like: how could I date order sort on penultimate string to end up with date ordered ? Job 1978924 (8) Ttt Pp 20-11-2012 Notes Job 1923886 Ccc Pl 31-08-2012 Notes ... -- SLUG - Sydney

Re: [SLUG] date sorting on second last string

2012-08-02 Thread peter
lists == lists li...@sbt.net.au writes: lists I have a wget /sed/awk shell script that fetches page and lists emails, the resulting format is like: lists how could I date order sort on penultimate string to end up lists with date ordered ? lists Job 1978924 (8) Ttt Pp 20-11-2012 Notes Job