Which one of the following command will be used for searching “director” in emp.lst?

Which one of the following command will be used for searching “director” in emp.lst?
A. grep “director”
B. grep -v “director” emp.lst
C. grep -director emp.lst
D. grep “director” emp.lst
 
Answer: d
Explanation: Because grep command is also a filter, it can search it’s standard input for the pattern. For example, the command grep “director” emp.lst will search the file emp.lst for the pattern “director” and will display the lines containing this pattern.
 

Tìm kiếm

Back
Top