in reply to onle liner help needed

There is (mostly) no need for linebreaks in perl code, so the answer to your question is as simple as
perl -e '$badxml = `cat /mmf/log/BadXMLXact*`; $badxml =~ /21-digit-n +umber(.|\n)+/; $& =~ m/\*\*\*.*UID/; $output = $`; for ($output ) { +s/\s{3,}/\n/g; } print $output;'
Besides that, I wonder about the reason you need to do it as a one liner, when you have a working script? I mean, a one liner is cool but not an end in itself.


holli, /regexed monk/

Replies are listed 'Best First'.
Re^2: onle liner help needed
by dimchik (Initiate) on Aug 20, 2007 at 14:19 UTC
    great! that worked. appreciate it, holli. i needed the one-liner since i have to run it remotely on several servers and did not want to install the script on every one of them.