Nine letter word(s) for woodworking

Nov 20, 2007 24 Replies

Now you're making me feel bad.

As it happens I'm a software designer doing mostly linux kernel customization/support for other groups within a large company.

I just haven't gone that deep into regex, I guess. If I'm interpreting it correctly, the second clause gets rid of entries with duplicate letters, and the third one selects for lowercase?

Chris

egrep '^[a-z]{8}$' /usr/share/dict/words | grep -v '\(.\).*\1'

it's shorter. :-)

A shameless plug:

ShopFileR

Skip

formatting link

The first grep selects all nine-character words.

The second grep removes entries with duplicate characters.

The third grep gets rid of all proper nouns (capitalized), and hyphenated words, by selecting those that include only lower case letters.

#1 and #3 could have been combined, but it's IMHO less elegant that way.

Seems to run a little faster too (at least on OpenSUSE)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required