The longest left hand typed word

On slashdot somebody desribes that you can find the longest left hand typed password with UNIX tools like grep. That's a simple solution for a difficult problem!

Here is a script that would print the longest words typable with the left hand side of a keyboard. The list shows the longest word on top.


cat /usr/share/dict/words | while read word ; do
  for letter in y u i o p h j k l n m ; do
   echo "$word" | grep "$letter" > /dev/null
   if [ "$?" = 0 ] ; then

  if [ "$status" = "notfound" ] ; then
   echo "$word"
done | while read match ; do
  length=$(echo "$match" | wc -c)
  echo "$length $match"
done | sort -nr | awk '{print $2}'