1.

Which option displays only the filename containing the pattern?(a) -i(b) -n(c) -e(d) -lI had been asked this question during an interview.The query is from grep command in portion Filters using Regular Expressions of Unix

Answer»

Correct choice is (d) -l

For explanation I would say: The -l (list) OPTION DISPLAYS only the NAMES of FILES containing the pattern. For example, the following command will display the FILENAMES having an extension .lst and containing the pattern ‘director’:



Discussion

No Comment Found

Related InterviewSolutions