I'm currently stuck on a question for my Unix course that requires us to search for any words that have the following characteristics. I was wondering if anyone could assist in crafting such a command, as it's far more convoluted than anything I've done before. The characteristics for a word in the English language are as follows.
It must ...
- be exactly 5 characters long
- begin with an upper or lowercase vowel (a, e, i, o, u, or y)
- have a lowercase 't' in the middle position.
- end with a lowercase 's'
- The rest of the characters can be any character that occur in English words; i.e, uppercase, lowercase, hyphen, numbers, etc.
So far I've gotten something like this.
within brackets and such.
All of this must be using grep and use
/usr/share/dict/words to find what the command reads.
I just need to know what parameters to use. Pretty dang confusing.
The main issue I'm finding is ensuring the first character is uppercase OR lowercase, whilst ensuring the remaining characters can be interchangeable as uppercase or lowercase.