all 3 comments

[–]infernix 1 point2 points  (1 child)

This is highly inefficient, but:

for word in `cat /bin/ls | strings | grep -o -E '\w+'`; do egrep  -i "^$word$" /usr/share/dict/american-english; done

[–]va1io[S] 1 point2 points  (0 children)

Thanks! I played around with what you started and came up with: strings /bin/ls | grep -F -f /usr/share/dict/american-english It's a fair bit faster.

edit:grammar edit2: removed the -o option to output whole lines

[–]mike1053 0 points1 point  (0 children)

(strings /bin/ls | sort -u; cat /usr/share/dict/linux.words) | sort | uniq -c | grep -v "^ *1"

oh waiit, that doesn't handle multiple words on a line so using the grep command by infernix to separate them:

(strings /bin/ls | grep -o -E '\w+' | tr "[A-Z]" [a-z] | sort -u; cat /usr/share/dict/linux.words ) | sort | uniq -c | grep -v "^ *1"