OT - fun with sed

Chris Mohler cr33dog at gmail.com
Wed Jun 11 22:52:50 UTC 2008


Blech - I completely missed the fact that sed wants '*' and not '+' to
match multiple instances.  D'oh!

This seems to get everything but the last line:
sed -e ':a;N;$!ba;s/\([0-9][0-9][0-9][0-9][0-9]\n\)*\([[0-9][0-9][0-9][0-9][0-9]\n\)/\2/g'

Chris




More information about the ubuntu-users mailing list