finding the presence of a word in a list of 'n' files
(pattern matching)

Answers were Sorted based on User's Feedback



finding the presence of a word in a list of 'n' files (pattern matching)..

Answer / nayak

grep -l "pattern" *

Is This Answer Correct ?    1 Yes 1 No

finding the presence of a word in a list of 'n' files (pattern matching)..

Answer / akshay chavan

sed -n '/matchingpattern/g' file1 file2...

Is This Answer Correct ?    5 Yes 8 No

Post New Answer

More Unix General Interview Questions

How do I remove 30 days old files in unix?

0 Answers  


command to view process running?

8 Answers   TCS,


Suppose you have a scheduling chain where the process 1 is a predecessor of the process 2 and both of them are scheduled every Monday at 8.00pm. Will I find execution log of process 1 every Tuesday morning? And what about the other one? Why?

1 Answers   Accenture, IBM,


What are the phases of swapping a page from the memory?

0 Answers  


What does cp mean in unix?

0 Answers  






Was unix the first operating system?

0 Answers  


How to find the path in unix?

0 Answers  


What does sort do in unix?

0 Answers  


How would you identify daemons in unix?

0 Answers  


Is unix a programming language?

0 Answers  


Is unix more secure than windows?

0 Answers  


What is the significance of the superuser?

0 Answers  


Categories