>>>>> "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 1923886 Ccc Pl lists> 31-08-2012 Notes ... Pity it's not ISO date yyyy-mm-dd But you can do it with multiple sort keys. Penulitmate is hard --- easier to sort after moving the date tot he start, then strip it again. Something like (untested): sed 's/^.* \([0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9][0-9][0-9]\) [^ ]*$/\3\2\1 &/p' | sort | sed 's/^........ //' Peter C -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html