Putty grep Count String Occurrences or Number Of String Matches In File | Java @ Desk
Home » » Putty grep Count String Occurrences or Number Of String Matches In File

Putty grep Count String Occurrences or Number Of String Matches In File

Putty grep Count String Occurrences or Number Of String Matches In File

grep command is used to find and print the string from the log file. Consider a log file which prints a bunch of log lines containing "Saved User Details For User...". To get how many user got saved into the database, simply we can count the number of occurences of above string in a log file.

Command to achieve this :

grep -c "Saved User Details For User" output16042014.log




0 comments:

Post a Comment