On Thu, 18 Aug 2005, Florin Iucha wrote: > On Thu, Aug 18, 2005 at 08:37:48AM -0500, Carl Wilhelm Soderstrom wrote: >> >> here's Mike Miller's one-liner: >> [chrome at mailhost:~]$egrep '^From ' ~/Mail/procmail.log | gawk '{print $4" "$5", "$7}' | uniq -c >> >> and here's Florin's one-liner: >> [chrome at mailhost:~/Mail]$ cat procmail.log | sed -n -e '/From [^@]*@/ s/.* [^ ]* \([^ ]* [^ ]*\) .*/\1/p' | sort | uniq -c > > My script looks for dates as they occur _two spaces_ after some variable > piece of text [1]. The awk is more straight forward but can be thrown > off by extra logging at the beginning, or spaces in names. I don't understand how that command can be thrown off. It first egreps for the '^From ' lines, so it doesn't get extra lines and it doesn't miss lines, then it does the gawk on only those lines. Those lines have a uniform format. There are never "spaces in names" because the names are always email addresses that cannot have spaces in them. So the number of fields is always the same and the gawk will never fail. Mike