Shell & Grep: Where we count certain strings in a log file by hour.
for var in `seq 10 23`;
do
echo 'Feb 28 '$var;
grep 'Feb 28 '$var /log/cli/Hanson/2015-02-28.log | grep 'Duplicate order cancel' | wc -l;
done
How can we see: Number of Errors in several files.
Output as: Number Filename
No comments:
Post a Comment