Quickly mass update the PO-Revision-Date header in gettext archives (.po files).

sed 's/PO-Revision-Date:.*/PO-Revision-Date: 2010-02-14 10:09+0000\\n"/g' filename.po

This finds all occurrences (there should only be one) of PO-Revision-Date will sets the date to 2010-02-14 and 10:09 am.

From there one can employ find/xargs etc to repeat the same thing for a great number of files.

-i causes an inline edit (edits the same file in place without a backup). Without the -i flag output it sent to STDOUT from where you can redirect to another file

Leave a Reply

(required)

(required)

© 2010 safsata.org / thatissopunkrock.org Please enjoy responsibly. Suffusion WordPress theme by Sayontan Sinha