Note that there are some explanatory texts on larger screens.

plurals
  1. POPython - How do i write only case statements and instances start with $ from input text file?
    text
    copied!<p>I want to only write into a file case line and all instances start with symbol <code>$</code> in nvp_add function after statement Extended attributes from below input file, so i'm expecting for output like below in my text output file.</p> <pre><code>case "11": ### eventDDoSLow $severity $description $eventID $eventURL $alertLevel $eventStart $eventSourceCount $eventSourceTable $eventDestCount $eventDestTable $eventProtocolCount $eventProtocolTable </code></pre> <p>Input file as below:</p> <hr> <pre><code> case "11": ### eventDDoSLow include "$NC_RULES_HOME/include-snmptrap/riverbed/riverbed- MAZU-MIB.parser.include.snmptrap.rules" @URL = $eventURL $OS_EventId = "SNMPTRAP-riverbed-MAZU-MIB-eventDDoSLow" @AlertGroup = "Denial Of Service" @AlertKey = "Event ID: " + $eventID @Summary = "Denial of Service ( Src: " + $mazuSourceName + ", Dest: " + $mazuDestName + " )" + " ( " + @AlertKey + " ) " $DEFAULT_Severity = 2 $DEFAULT_Type = 1 $DEFAULT_ExpireTime = 0 @Identifier = @Node + " " + @AlertKey + " " + @AlertGroup + " " + $DEFAULT_Type + " " + @Agent + " " + @Manager + " " + $specific-trap $alertLevel = $alertLevel + " ( " + $5 + " )" if(match($OPTION_EnableDetails, "1") or match($OPTION_EnableDetails_riverbed, "1")) { details($severity, $description, $eventID, $eventURL, $alertLevel, $eventStart, $eventSourceCount, $eventSourceTable, $eventDestCount, $eventDestTable, $eventProtocolCount, $eventProtocolTable) } @ExtendedAttr = nvp_add(@ExtendedAttr, "severity", $severity, "description", $description, "eventID", $eventID, "eventURL", $eventURL, "alertLevel", $alertLevel, "eventStart", $eventStart, "eventSourceCount", $eventSourceCount, "eventSourceTable", $eventSourceTable, "eventDestCount", $eventDestCount, "eventDestTable", $eventDestTable) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload