I think sed is up to the task, here's one way to do it without busting out
a scripting language:

sed -e
's#\([[:digit:]]\{2\}\)/\([[:digit:]]\{2\}\)/\([[:digit:]]\{4\}\)#\3-\1-\2#'

It looks like a mouthful, but it's really quite simple; it just matches
AA/BB/CCCC and makes it CCCC-AA-BB. If you get false matches within other
columns, you could try anchoring against the comma that bounds the field.


On Thu, Dec 13, 2012 at 2:38 PM, Rich Shepard <[email protected]>wrote:

> On Thu, 13 Dec 2012, Paul Heinlein wrote:
>
> > E.g.,
> >  date -d '08-04/2004' +%Y-%m-%d
>
>    Looks like a python script is called for to process all 6404 data rows
> (and skip the header row).
>
> Thanks, Paul,
>
> Rich
>
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to