Last active
September 26, 2015 19:31
-
-
Save raine/2f2c1206390aab878023 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
cat $1 | R -rR --slurp \ | |
'unlines' \ | |
'to-lower' \ | |
'match /\w+/g' \ | |
'lodash.uniq' \ | |
'sort-by length' \ | |
'reverse' \ | |
'take 10' | |
# $ time ./longest-words shakespeare-hamlet-25.txt | |
# transformation | |
# unproportioned | |
# inventorially | |
# determination | |
# schoolfellows | |
# circumscribed | |
# reconcilement | |
# circumstances | |
# recognizances | |
# imperfections | |
# ./longest-words shakespeare-hamlet-25.txt 0.66s user 0.06s system 101% cpu 0.706 total | |
cat $1 | R -rR --slurp \ | |
'unlines' \ | |
'to-lower' \ | |
'match /\w+/g' \ | |
'uniq-with identical' \ | |
'sort-by length' \ | |
'reverse' \ | |
'take 10' | |
# ~ ❯❯❯ time ./longest-words shakespeare-hamlet-25.txt | |
# transformation | |
# unproportioned | |
# inventorially | |
# determination | |
# schoolfellows | |
# circumscribed | |
# reconcilement | |
# circumstances | |
# recognizances | |
# imperfections | |
# ./longest-words shakespeare-hamlet-25.txt 9.88s user 0.08s system 99% cpu 10.004 total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment