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!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...