[Users] Date fix script grep error
paulsteyn1 at afrihost.co.za
Sun Jan 13 13:33:18 CET 2019
I get some mails with a missing "Date" header, so I just installed the
"Fix missing date" script from here:
However, I was getting a "grep: Invalid range end" error, even though
the script seemed to be fixing the mails correctly. After a little
investigation, I found that grep doesn't seem to like the "[-+]" found
in the two "$DATE_REGEXP_STRICT" and "$DATE_REGEXP" regexen, as it
wants hyphens to be at the end of bracket expressions, or it
considers them part of range expressions. Simply changing this to "[+-]"
seemed to fix the issue.
This is with grep (GNU grep) 3.3 on Arch Linux. As this is documented
behaviour in the grep manpage, it seems to be a safe and portable
I've made the change on my side, and as I mentioned it doesn't seem to
cause anything but an ignorable error message, but I thought this should
for completeness sake be corrected in the original.
I'm not sure who the maintainer for that script is (if there is one),
or what the process for submitting this as a bug would be, so if anyone
in the know could make the change (or provide reasons why not to), or
point me in the right direction, I'd appreciate it.
More information about the Users