processing data within files
I have some squid log files that I am feeding into an app. for analysis.
The log files contain one line entries like syslog, and due to the way I've got the authentication set up, every session first pops up a TCP_DENY entry on the log.
What I want to do is purge my log files of any lines which contain the text 'TCP_DENY'
Anyone know a nice elegant way to do this? I have a feeling grep is the answer but I don't know how to get it doing what I want and my google search has been fruitless!
I've got a script set up which is run by cron daily, that rotates my logs and zips them up and ftps them off to a remote server, I'd like to include the TCP_DENY purge as part of that script.
Any help appreciated!