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.

#!/bin/sh

status="notfound"
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
    status="found"
   fi
  done

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

Comments

#!/bin/sh grep -E

#!/bin/sh

grep -E '^[qwertasdfgzxcvb]+$' do
echo `echo $word | wc -c`:$word
done | ( sort -n )

Marvelous post you share

Marvelous post you share actually I am regular fan of your site and i read this full post till end and I like it very much. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have. The design is good. The information contained in this website is full of informative insights.

About Consultancy Articles Contact




References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning [email protected]