cat /usr/share/dict/words | egrep '^\w{13,}$' | egrep -iv '(\w).*\1'

Are there any words in the English language that use at least half of the alphabet without repeating any letters?

This is the most straightforward approach: first regexp limits dictionary file to words with thirteen or more characters, second regexp discards any words that have a letter repeated. (Bonus challenge: Try doing it in a single regexp!)
Sample Output
# You'll just have to try it to find out!

These Might Interest You

  • Translate strings from non-german to german (and vice versa) using LEO. Put it in your ~/.bashrc. Usage: leo words   To use another language other than english, use an option: leo -xx words Valid language options: ch - chinese en - english es - spanish fr - french it - italian pl - polish pt - portuguese ru - russian The other language will always be german! Show Sample Output

    leo (){ l="en"; if [ "${1:0:1}" = "-" ]; then l=${1:1:2};shift;fi;Q="$*";curl -s "${l}de/?search=${Q// /%20}" | html2text | sed -e '0,/H.ufigste .*/d;/Weitere Aktionen/,$d;/f.r Sie .*:/,$d' | grep -aEA900 '^\*{5} .*$'; }
    michelsberg · 2013-06-24 22:35:46 4
  • Uses google api to translate, you can modify the language in which translate modifying the parameter "langpair=|en", the format is language input|language output.

    wget -qO - "|en&v=1.0&q=`xsel`" |cut -d \" -f 6
    fain182 · 2010-06-04 17:20:17 0
  • You can use any dictionary you want, in any language. This command will output all single-word annotations that you have underlined in your Kindle device (provided the file) given a list of language-specific words. If you want to learn vocabulary, this command is ideal.

    awk -F" " '{ if ( NF == 1 ) { print $0 } }' KINDLE_NOTES_FILE.txt | sed -e '/^=/d' | sed -e '/^[[:space:]]*$/d' -e 's/,//g' | sort | comm -12 List_of_language_words.txt - | uniq
    parmegv · 2011-08-15 14:35:33 0
  • nsacodenamegenerator dot com is no more outputs random two words together in capital letters Show Sample Output

    shuf -n 2 /usr/share/dict/words | tr -dc [:alnum:] | tr '[:lower:]' '[:upper:]'; echo
    ktree · 2017-08-27 21:35:36 0
  • Consider this line : random perl language this make possible is is possible to rearrange words with $F perl variable and word index, starting from 0. Show Sample Output

    perl -lane 'print "$F[0]:$F[1]:$F[2]"' myfile
    servermanaged · 2009-05-09 21:30:55 0
  • EDIT: command updated to support accented characters! Works in any of 58 google supported languages (some sound like crap, english is the best IMO). You get a mp3 file containing your query in spoken language. There is a limit of 100 characters for the "q" parameter, so be careful. The "tl" parameter contains target language.

    wget -q -U Mozilla -O output.mp3 "
    sairon · 2011-03-08 14:05:36 12

What Others Think

P.S. Please don't put the answer in the comments. Let people figure it out and/or be surprised! :-)
hackerb9 · 189 weeks and 6 days ago
the "cat blah | egrep " structure is always ugly to me. the following does exactly the same : egrep '^\w{13,}$' /usr/share/dict/words | egrep -iv '(\w).*\1'
snaguber · 186 weeks and 5 days ago
You're right, snaguber, that does work and it saves four or five keystrokes plus an entire process. I find the superfluous cat helpful, even beautiful, when I'm working with pipelines, though, as it keeps the data flowing from left to right. Beauty is in the eye of the beholder, I suppose.
hackerb9 · 186 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: