The command
grep first second third /usr/you/myfile

a) prints lines containing the words first,
second or third from the file /usr/you/myfile
b) searches for lines containing the pattern
first in the files
second, third, and /usr/you/myfile and prints them
c) searches the files /usr/you/myfiel and
third for lines containing
the words first or second and prints them
d) replaces the word first with the word
second in the files third and /usr/you/myfile
e) None of the above

Answer Posted / brijmohan

None of the option will work.

Because "grep first second third" this command will search
for the same pattern and but it should grep "first second
third" instead of grep first second third.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of sed command in unix?

592


What is the nmap command?

579


How does the system know where one command ends and another begins?

1574


What is used to type command?

539


Explain command to show the space allocation of files?

627






What is the search command in unix?

597


What difference between cmp and diff commands?

720


What do chmod command do?

600


What is the comma to display different lines that are found when compare two files?

593


What is ctrl d?

592


What are the dos commands?

644


Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

951


Why is it called a shebang?

566


What are awk commands?

582


What does sed command do in unix?

558