mcad1dl has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone composed a script to clean up SUDO logs. Depending on the user there can be quite a bit of garbage in these logs. Just starting with Perl I need to know who to strip out all the the extraneous escape codes like ^H [[D [[22;27m and things as such.

Any help would be greately appreciated..

Edit by tye

Replies are listed 'Best First'.
Re: Perl & SUDO
by sauoq (Abbot) on Jul 24, 2003 at 22:04 UTC

    Perhaps you'd like to supply us with some of your data (remove any sensitive information, please) and/or any code you've written while attempting this.

    What are you really trying to do? Clean some logs for visual inspection? Process the log files for statistics? Look for anomalies? Isolate usage patterns?

    In our environment, sudo logs to syslog and we have tools for analyzing the syslog files.

    -sauoq
    "My two cents aren't worth a dime.";