Ralf Hildebrandt disse na ultima mensagem: > * Rob Asher <rasher@xxxxxxxxxxxxxxxxxxx>: >> Here's something similar to what you're already doing except comparing >> to a file of "badwords" to look for in the URL's and then emailing you >> the results. >> >> #!/bin/sh >> # filter.sh >> # >> cd /path/to/filterscript >> cat /var/log/squid/access.log | grep -if /path/to/filterscript/badwords >> > hits.out > > Useless use of cat: > grep -if /path/to/filterscript/badwords /var/log/squid/access.log > > hits.out > >> /path/to/filterscript/wordfilter.gawk hits.out >> >> cat /path/to/filterscript/word-report | /bin/mail -s "URL Filter Report" >> you@xxxxxxxxxxxxxx > > Useless use of cat: > /bin/mail -s "URL Filter Report" you@xxxxxxxxxxxxxx < > /path/to/filterscript/word-report > well, when you are doing optimizing do it entirely :) - only one line: grep arg file | $mail_cmd then, if you awk the log and pipe the buffer into the mail_cmd you even do not need to create files and delete them later, so you can have it all in one line but at the end this entire search might be useless since there is no guaranty that www.mynewbabyisborn.org is no porn and that www.butt.com is porn, or how do you catch www.m-y.d-i.c-k.a.t.microsoft.com ? I abandoned all this keyword_stuff_searching long time ago because even if it would work the user still could use a fantasyproxy somewhere on port 42779 or a vpn as hamachi and then you do what? michel ... **************************************************** Tecnologia Internet Matik http://info.matik.com.br Sistemas Wireless para o Provedor Banda Larga Hospedagem e Email personalizado - e claro, no Brasil. ****************************************************