Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi, thanks for your reply. The input data is as I said the syslog message log file. But it is actually not important. The regex is not the problem here (I am comfortable in this part) it filters as expected. The problem is the following sequence of boolean operations. However it looks like site formatting added some spurious "+" (line breaks>) to it

There is also currently no meaningfull result as this script will later be dynamic where depending on the callers parameter the syslog data is filtered and complete line or parts of it returned.

My first try was to filter data and just output the system name (group $3, $1=complete line, $2=date/time, group $3=system name, $4=source $5=optional source PID, ...).

The problem is how to correctly filter some of the groups and only print on positiv match, and why my examples are not working (for getting better understanding of perl).

But here some sample data:

Sep 21 19:18:25 tic kernel: hv_balloon: Balloon request will be partia +lly fulfilled. Balloon floor reached. Sep 21 19:23:10 tic crmd[1427]: notice: State transition S_IDLE -> S_ +POLICY_ENGINE Sep 21 19:23:10 tic pengine[1426]: warning: Fencing and resource manag +ement disabled due to lack of quorum

In reply to Re^2: Need advice in for perl use as awk replacement by Anonymous Monk
in thread Need advice in for perl use as awk replacement by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-23 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found