Skip to content

Instantly share code, notes, and snippets.

@helix84
Created June 16, 2017 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helix84/39e1d94e416eff7cd0c4a15c0beac0e7 to your computer and use it in GitHub Desktop.
Save helix84/39e1d94e416eff7cd0c4a15c0beac0e7 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Usage: potouch.sh *.po
# in all files given as arguments (Gettext .po files),
# change the time in the PO-Revision-Date header to current time
# modifies the specified files in place
now=`date +"%F %H:%M%z"`
sed -i "s/PO-Revision-Date: .*\\\\n/PO-Revision-Date: $now\\\\n/" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment