Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / sathe santosh

The above command will not work.
grep searches the 1st argument in 2nd argument(filename).
The filename has multiple patterns.

example:

cat 1.lst
hi
hello
bye

see the below message.

grep hi hello 1.lst
grep: can't open hello
1.lst:hi

same can be done using below command.

grep -e hi -e hello 1.lst

hi
hello

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the command to view process running?

1113


Using unix command how to display no of records in oracle?

1167


What are file commands?

1236


What are the general commands in using unix os for a beginner?

1175


Differentiate cat command from more command.

1158


Which command should you use to find the remaining disk space in unix server?

1316


Which command is used to kill the last background job?

1338


What does sed command do in unix?

1203


how to sort the content of the file based on numeric values

1789


Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?

1223


Which command is used to restrict incoming messages?

1113


How does shebang work?

1074


Describe the usage and functionality of the command rm –r * in unix?

2107


Why is awk called awk?

1083


Why is shebang used?

1133