I am having some problems with sed, that I am hoping that I can get some assistance with. I am trying to remove two subsets of a string, and cannot figure out how to have it work.
Here is an example string:
[Wed Sep 24 08:47:46 2008] [warn] [client xxx.xxx.xxx.xxx] [28580] auth_ldap authenticate: user joe authentication failed; URI /svn/ [User not found][No such object]
I want to use sed to remove [Wed Sep 24 08:47:46 2008] [warn] including the [ and ]. I only want the first two of these removed.
Suggestions or pointers on doing something like this?
I cannot do this in the apache conf file, as this sed statement is actually so that I can send SNMP trap data, I do not want to change what is going into the log files.
I begged some of the other guys I know to assist me, and they gave me two other options as well.. Here they are for anyone else who needs something like this..