Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if [ $# -eq 0 ]
- then
- echo "$(basename $0) [-w|-c|-l|-L]? file.pdf+"
- echo "\t-w : count words"
- echo "\t-c : count characters"
- echo "\t-l : count lines"
- echo "\t-L : maximum line length"
- exit 1
- fi
- wcopt=""
- for i in -w -c -l -L
- do
- [ "$1" = "$i" ] && wcopt="$wcopt $i" && shift
- done
- pdftotext $* - | egrep -E '\w\w\w+' | wc $wcopt
Add Comment
Please, Sign In to add comment