grep lines that contain three words from files in the same directory
Hi,
I need to grep lines that contain three words from files in the same directory
And next to the greped line I need to have the file that the line came from.
Example:
The directory is:
/var/logs
The files in the directory are:
XSLog2012.05.14-15.40.48.txt
XSLog2012.05.14-15.49.01.txt
XSLog2012.05.14-15.57.11.txt
XSLog2012.05.14-16.05.07.txt
XSLog2012.05.14-16.11.41.txt
XSLog2012.05.14-16.18.26.txt
XSLog2012.05.14-16.25.16.txt
XSLog2012.05.14-16.32.00.txt
XSLog2012.05.14-16.38.43.txt
XSLog2012.05.14-16.45.41.txt
XSLog2012.05.14-16.52.50.txt
XSLog2012.05.14-17.00.03.txt
XSLog2012.05.14-17.06.38.txt
XSLog2012.05.14-17.14.00.txt
XSLog2012.05.14-17.20.41.txt
XSLog2012.05.14-17.27.35.txt
XSLog2012.05.14-17.34.57.txt
XSLog2012.05.14-17.42.23.txt
XSLog2012.05.14-17.50.01.txt
XSLog2012.05.14-17.57.01.txt
XSLog2012.05.14-18.04.16.txt
XSLog2012.05.14-18.12.12.txt
XSLog2012.05.14-18.19.54.txt
XSLog2012.05.14-18.26.49.txt
The words that I need to be greped in one line are:
Related Article:Linux User Permissions
is a Linux and Unix discussion thread by msrikanth that has 8 replies, was last updated 10 months ago and has been tagged with the keywords: linux, user, permissions, root.