LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with EGREP in terminal (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-egrep-in-terminal-4175429500/)

raoulduke666 09-28-2012 06:02 PM

Help with EGREP in terminal
 
I'm using an open terminal, and changing directories to /usr/share/dict. There is a file called words in dict that contains every word in the english language. I also have to use the egrep command. What command would you use to:

-list all words that have the letter 'a' followed immediately by the letter z

-list all words that have the letter a followed sometime later by the letter z (there must be one letter in between)

Essentially the command line would be

egrep ...... words

Thanks!

AlucardZero 09-28-2012 06:43 PM

This sounds like homework, which I won't do for you.

Try
Code:

man 7 regex
or Google.


All times are GMT -5. The time now is 01:19 PM.