Perl

List the four-letter words in a file
cat cotus.txt | perl -ne 'print map("$_\n", m/\w+/g);' | tr A-Z a-z | sort | uniq | awk 'length($1) == 4 {printf "%5s", $0} END {print ""}'

Print all the four letter words in the Bible
cat kjv.txt | perl -ne 'print map("$_\n", m/\w+/g);' | tr A-Z a-z | sort | uniq | awk 'length($1) == 4 {printf "%s ", $0}'



Sort the Holy Bible by verse length
perl -e 'print sort {length $a <=> length $b} <>' kjv.txt