Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- for f in "$@"
- do
- w=`cat "$f" | sed "s/ */\\n/g" | sed "s/[^a-zA-Z0-9]//g" | sed "s/[0-9]*//g" | sed "/^$/d" | wc -w`
- s=`cat "$f" | tr -d " \t\n\r" | sed "s/\./\\n/g" | sed "s/\?/\\n/g" | sed "s/\!/\\n/g" | wc -l`
- z=$(expr "$w" / "$s")
- echo $f:
- echo " "$w words
- echo " "$s sentences
- echo " "The average sentence is $z words long.
- done
Add Comment
Please, Sign In to add comment