Paul Chvostek wrote:

>>      This is an attempt to isolate every MAC address that
>> appears and then sort and count them to see who is having
>> trouble or, in some cases, is causing trouble.
> 
> Then you still may want to use awk for some of that...
> 
>       cat /var/log/dhcpd.log | \
>       sed -nE 's/.*([0-9a-f]{2}(:[0-9a-f]{2}){5}).*/\1/p' | \
>       awk '
>        { a[$1]++; }
>        END {
>         for(i in a){
>          printf("%7.0f\t%s\n", a[i], i);
>         }
>        }
>       ' | sort -nr
> 

Euhmm:

sed -nE 's/.*([0-9a-f]{2}(:[0-9a-f]{2}){5}).*/\1/p' /var/log/dhcpd.log|\
sort | uniq -c

:-)
Peter

-- 
http://www.boosten.org
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to