Friday, January 30, 2009

Seraching for exception in log file

#!/bin/bash
for X in $(egrep -o "[A-Z]\w*Exception" log_week.txt | sort | uniq) ;
do
echo -n -e "processing $X\t"
grep -c "$X" log_week.txt
done

From the productive programmer

No comments: