[SlugBug] Re: data formatting query
Bill Best
bill.best at commedia.org.uk
Thu Dec 8 21:06:02 GMT 2005
hi
Chris J wrote:
> And Lo! The Great Prophet Bill Best uttered these words of wisdom:
[...]
> Oh goody - a long time since I've seen a scripting question :-)
> Several ways to do this, but this seems to be the quickest with my
> knowledge:
>
> awk '{ print $1, $2 }' < inputfile | grep -v '^$' | sort | uniq
thanks - that works. i didn't try the other methods :o)
> By the way, I'm assuming the dates in the file are all in the same month?
> If not, then a simple sort won't work - the format ddmmyy isn't ASCII
> sortable: 010705 (1 July '05) will be placed above 310505 (31 May 05). The
> date formay 'yymmdd' or even beter 'yyyymmdd' allows simple ASCII sorts of
> dates without having to resort to convoluted or custom sort rules/routines.
you've anticipated my next question...
any quack-ish way to get the output into date order?
maybe i'll just put the output into a spreadsheet and column sort or
something...
> Cheers,
>
> Chris...
many thanks
bill best
More information about the SlugBug
mailing list