Created
April 5, 2013 14:58
-
-
Save mark-rushakoff/5319950 to your computer and use it in GitHub Desktop.
Count words in your Leanpub book
This file contains 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
#!/bin/sh | |
BOOK_SRC="${$1:-Book.txt}" | |
cat "$BOOK_SRC" | xargs cat | # dump out all the files in the book | |
sed 's/%%.*$//g' | # naively strip comment delimiter to end of line | |
wc -w | # print out the word count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment