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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...