Created
December 18, 2011 22:08
-
-
Save emres/1494637 to your computer and use it in GitHub Desktop.
Language detection in Bash command line (for German)
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
en_res=$(echo $(cat some_de.txt EN | gzip | wc -c) - $(gzip -c EN | wc -c) | bc); \ | |
de_res=$(echo $(cat some_de.txt DE | gzip | wc -c) - $(gzip -c DE | wc -c) | bc); \ | |
(echo $en_res EN && echo $de_res DE) | sort -n | head -1 | cut -d' ' -f2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment