[PLUG] more about specialized reports

Mike De La Mater mikedela at ipns.com
Wed Feb 5 14:30:02 UTC 2003


I really should take a programming class somewhere...

I've used logical operators since the 7400ls chips came out, 
but never for programming...

Mike



2/5/03 1:45:00 AM, Rogan Creswick <creswick at cs.orst.edu> 
wrote:

>> So, would this find gba and eliminate the small and 132 
lines?
>> 
>> grep gba /var/log/httpd/access_log | grep  -v _small.jpg | 
-v grep 132 | wc
>
>Yep. or you could probably combine the lat two greps into 
>
>egrep -v "_small.jpg|132"
>
>(use deMorgan's Law) 
>
>-Rogan
>
>On Tue, Feb 04, 2003 at 11:52:32PM -0800, Mike De La Mater 
wrote:
>> So, would this find gba and eliminate the small and 132 
lines?
>> 
>> grep gba /var/log/httpd/access_log | grep  -v _small.jpg | 
-v grep 132 | wc
>> 
>> 
>> Mike
>> 
>> 2/4/03 11:43:16 PM, Rogan Creswick <creswick at cs.orst.edu> 
wrote:
>> 
>> >I think hte post above is a cleaner solution, but the 
code below can
>> >be condensed:
>> >
>> >grep gba /var/log/httpd/access_log | grep _small.jpg | wc
>> >
>> >The first # output by wc is the line count (the number of 
lines that
>> >matched both greps)
>> >
>> >pipeing grep to grep is an invaluable tool for searching 
code, btw. 
>> >
>> >find . -name "*.lisp" | xargs grep -in <function_name> 
>> >
>> >if that floods your screen,
>> >
>> >!! | grep -i "def"
>> >
>> >and you have the file, line # and function prototype..
>> >
>> >-Rogan
>> >
>> >
>> >On Tue, Feb 04, 2003 at 11:26:04PM -0800, Mike De La 
Mater wrote:
>> >> If I use this, I get the actual lines, but I only care 
about the counts. 
>> Should I 
>> >> just egrep -c the result files?
>> >> 
>> >> Mike De La Mater
>> >> Small business networks and technology consulting
>> >> 503-702-6749
>> >> mikedela at ipns.com 
>> >> 
>> >> 
>> >> #!/bin/sh
>> >> 
>> >> MATCH="gba"
>> >> LOGFILE="/var/log/httpd/access_log"
>> >> 
>> >> grep $MATCH $LOGFILE > /root/Desktop/gba.txt
>> >> 
>> >> 
>> >> MATCH="small\|132\"
>> >> LOGFILE="/root/Desktop/gba.txt"
>> >> 
>> >> grep -v $MATCH $LOGFILE > /root/Desktop/gba-1.txt
>> >> 
>> >> 
>> >> 
>> >> 
>> >> 
>> >> 
>> >> _______________________________________________
>> >> PLUG mailing list
>> >> PLUG at lists.pdxlinux.org
>> >> http://lists.pdxlinux.org/mailman/listinfo/plug
>> >
>> >_______________________________________________
>> >PLUG mailing list
>> >PLUG at lists.pdxlinux.org
>> >http://lists.pdxlinux.org/mailman/listinfo/plug
>> >
>> Mike De La Mater
>> Small business networks and technology consulting
>> 503-702-6749
>> mikedela at ipns.com 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> PLUG mailing list
>> PLUG at lists.pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
>
>_______________________________________________
>PLUG mailing list
>PLUG at lists.pdxlinux.org
>http://lists.pdxlinux.org/mailman/listinfo/plug
>
Mike De La Mater
mikedela at ipns.com
503-702-6749 







More information about the PLUG mailing list