Skip to content

Instantly share code, notes, and snippets.

@coyotte508
Created June 30, 2012 18:53
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 coyotte508/3025095 to your computer and use it in GitHub Desktop.
Save coyotte508/3025095 to your computer and use it in GitHub Desktop.
How to add line numbers to a file (with preserving the BOM character) on PO (all .txt files of a subfolder)
find db/moves -name "*.txt" -exec bash -c './remove-bom.sh {} && awk '\''{ print NR-1 " " $0 }'\'' {} > {}~ && mv {}~ {} && ./add-bom.sh {}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment