Hi,
I have requirement to find the matching patterns of two files in Unix. One file is the log file and the other is the error list file. If any pattern in the log file matches the list of errors in the error list file, then I would need to find the counts of the match.
For example,
Log file has the below information:
error list file has the below information:
As "Permission denied" matches in both the files, the output count should be 1.
I tried to use grep -Ff option but I am getting the below error:
grep: illegal option -- F
grep: illegal option -- f
Usage: grep -hblcnsviw pattern file . . .
Please help
I have requirement to find the matching patterns of two files in Unix. One file is the log file and the other is the error list file. If any pattern in the log file matches the list of errors in the error list file, then I would need to find the counts of the match.
For example,
Log file has the below information:
Code:
sftp> cd /home/development/project
sftp> MPUT ABCD_*.zip
Uploading ABCD_20150220_20150220012345.zip to /home/development/project/ABCD_20150220_20150220012345.zip
Couldn't get handle: Permission denied
Code:
12,Permission denied,FTP error
14,No connection,Conection error
I tried to use grep -Ff option but I am getting the below error:
grep: illegal option -- F
grep: illegal option -- f
Usage: grep -hblcnsviw pattern file . . .
Please help