Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Add line numbers to multiline event using rex in sed mode

$
0
0
Hi, Is there a way to use fields in rex expression? I would like to do something like this: > | eval *num*=1 | accum *num* | rex mode=sed "s/(?m)^(.*)$/*num*. \1/g" meaning adding to multiline event line numbers **without** breaking the lines. I tried the [How to number each line in a multiline event?][1] but all the suggestions breaking the multiline event to event per line. I must save the event multiline to perform more actions on the result. [1]: https://answers.splunk.com/answers/227753/how-to-number-each-line-in-a-multiline-event.html

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>