Skip to content

Instantly share code, notes, and snippets.

@coyotte508
Created June 30, 2012 18:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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