What you can do with just one command on a “|”-separated logfile:

cat mylogfile.log | awk -F "|" '{print $4'} | sort | uniq -c

Funny things exist. I should program more funky shell scripts 😉

By Yashima

Writer of code and stories


  1. It counts the number of occurrences of different values in the ‘fourth field’ in a logfile which has fields separated by ‘|’ …. admittedly cat logfile is a bit better than the grep "" logfile which I have now switched ….

Comments are closed.