Guest User

Untitled

a guest
Aug 20th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if [ $# -eq 0 ]
  4. then
  5. echo "$(basename $0) [-w|-c|-l|-L]? file.pdf+"
  6. echo "\t-w : count words"
  7. echo "\t-c : count characters"
  8. echo "\t-l : count lines"
  9. echo "\t-L : maximum line length"
  10. exit 1
  11. fi
  12.  
  13. wcopt=""
  14.  
  15. for i in -w -c -l -L
  16. do
  17. [ "$1" = "$i" ] && wcopt="$wcopt $i" && shift
  18. done
  19.  
  20. pdftotext $* - | egrep -E '\w\w\w+' | wc $wcopt
Add Comment
Please, Sign In to add comment