Last active
January 3, 2018 12:25
-
-
Save timrwilliams/d43bba77ddede2af0478cdb2eb86ca35 to your computer and use it in GitHub Desktop.
Count number of unique keys and words in a Rails translation file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '{ if( $1 != "#" ){ print $0 } }' en.yml | awk -F':' '{print $2}' | awk 'NF' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Strip Comments | Extract words after a key definition (e.g. en.title: "My Title" extracts just "My Title") | remove blank lines | count words