Splunk Search

printing the output in a formated way

abhayneilam
Contributor

I have a file which contains :

Col1  Col2       Col3
abc    23        good
                  bad
xyz    34        this
                 that
mno    45        great

My output should be :

col1    col2    col3 
abc     23     good,bad
xyz     34     this,that
mno     45     great

Please help !!

Thanks
Abhay

0 Karma

sideview
SplunkTrust
SplunkTrust

The difference is that your col3 values are multivalued fields, and you want them to be a single field where each value is separated by commas.

Try this on the end of your search:

eval col3=mvjoin(col3,",")

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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