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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...