#56 remove_datetimeinfo SED broken

v3.0_testing
closed-fixed
nobody
5
2011-11-21
2011-11-21
Seanster
No

The SED script for cleaning the filenames in the 'latest' directory didn't work for me. Looks like it's just out of date with the code.

This is the sort of filename I have:

daily_mysql_Sunday_2011-11-20_19h42m.sql.bz2
daily_mysql_Sunday_2011-11-20_19h42m.txt.bz2

1) sed script doesn't have txt
2) sed script doesn't have bz2 (has gzip2)
3) sed script seems to expect an 8 digit alpha-numeric string between the minutes and the first suffix. "(_[A-Za-z0-9]{8})"

Here's the expression I used to fix my problem. I am not terribly skilled at sed so this was mostly trial and error, ymmv.
's/_(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday{1,2})_[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}h[0-9]{2}m(\.(sql|diff|txt)\.(gz|bz2)){1}/\2/g'

This produces: daily_mysql.sql.bz2

-Sean

Discussion

  • PittaGurneyi

    PittaGurneyi - 2011-11-21

    Thanks for reporting this bug. Indeed it is out of date. Fixed in rc2.

     
  • PittaGurneyi

    PittaGurneyi - 2011-11-21
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks