Question

10 pts) Write a single-line shell command that outputs the words in /usr/share/dict/words that begin with an uppercase A or an uppercase E, followed by any two characters, followed by a lowercase b, and ending with a lowercase a or a lowercase n Note that words greater than five characters in length are valid (i.e., there may be zero or more characters in between the lowercase b and the final lowercase a or lowercase n)! The command should append the output to a file in your home directory named mywords.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

hi,

Lets assume input words file has below data-

Agkba
Egkbn
hfhhfhff
hfhgh

Script for the desired output-

grep "[AE]..b[an]*" words > mywords

Screenshot-

Add a comment
Know the answer?
Add Answer to:
10 pts) Write a single-line shell command that outputs the words in /usr/share/dict/words that begin with...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • These are linux commands. Type cd /usr/share/dict. The file words is the Linux English dictionary. You...

    These are linux commands. Type cd /usr/share/dict. The file words is the Linux English dictionary. You will use egrep to explore this file. Your answers below will be the egrep command that solves the problem. a.List all words that have the letter a followed immediately by the letter z. b.List all words that have the letter a followed sometime later by the letter z (there must be at least one letter in between). c.List all words that start with the...

  • For this lab you will write a Java program that plays a simple Guess The Word...

    For this lab you will write a Java program that plays a simple Guess The Word game. The program will prompt the user to enter the name of a file containing a list of words. These words mustbe stored in an ArrayList, and the program will not know how many words are in the file before it starts putting them in the list. When all of the words have been read from the file, the program randomly chooses one word...

  • 1 Overview and Background Many of the assignments in this course will introduce you to topics in ...

    1 Overview and Background Many of the assignments in this course will introduce you to topics in computational biology. You do not need to know anything about biology to do these assignments other than what is contained in the description itself. The objective of each assignment is for you to acquire certain particular skills or knowledge, and the choice of topic is independent of that objective. Sometimes the topics will be related to computational problems in biology, chemistry, or physics,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT