Splunk Search

Cant get line break \n to create new lines between results when emailed?

dlespron
Path Finder

I know I must be missing something simple and have searched here trying multiple things but still can't get this to work. I get the results just fine and they come via email, but I need a blank line between each of the results in order to make easier for the end user to view. Can someone please help?

This is basically what I have right now:

$SearchText$ | rex mode=sed "s/\n/\n\n/g" | rex mode=sed "s/\x1/ /g" | sort _raw | table _raw | sendemail 

Thanks!

derekarnold
Communicator

The default format of a sendemail is a table format. try using

| sendemail format=raw

Failing that, you may have to use the options to attach a CSV or PDF instead.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...