On Tue, Oct 28, 2025 at 09:21:36PM +0800, W. D. Sadeep wrote:
> Dear list,
> 
> I'm thinking of parsing the /var/www/logs/access.log from httpd for
> purposes like identifying bot activity using fgrep, grep, cut, sed,
> sort, and uniq.
> 
> Is it safe to do that in a cron job?
> 
> I see requests that appear to embed scripts. So, I'm wondering if it's
> naive to parse them like that.
> 
> If that's the case, are there any precautions I can take?
> 
> -- 
> W. D. Sadeep 
> PGP: 103BF9E3E750BF7E
> 

I would advise using Perl if you already know it or are willing to learn it.
It is in base so you will never have to add a language to use it.
Also, Perl is particularly useful at parsing text. It is good at dealing
with multiple languages and has an excellent set of regex's compared to most
other programming languages. Complex to use if you really want to cover almost
everything, but capable. It's also just fine for one-liners in the terminal.

-- 
Regards,
Chris Bennett

Reply via email to