0

I need to look in /usr/share/dict/words for a 5-letter word that starts with d or D, followed by a lowercase vowel, and ends with s. I have tried everything but to no avail.

1
  • 1
    What does "I have tried everything mean"? Please include the commands you have tried in your question so we know what you have attempted.
    – terdon
    May 8, 2013 at 11:32

1 Answer 1

4
grep '^[dD][aeiou]..s$' /usr/share/dict/words
  • ^[dD] - match d or D at the beginning of the line
  • [aeiou] - match a, e, i, o or u
  • .. - match any two characters
  • s$ - match s, followed by the end of the line
1
  • Note that in my (British) /usr/share/dict/words, there are a lot more vowels than the aeiou characters (even if you don't want to consider y as a vowel). Also note that . matches any character, not only letters (it will typically match the apostrophe in the words file). May 8, 2013 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .