Splunk Search

How to sort the output with deliminator as ","

akash_akkis
New Member

Hi I want to search the output with sorted result which has output as below

   2014.09.08 02:52:07.559,2014.09.08 02:52:06.217,**1342**,jhdlkljkljsdjlkj

I want to sort the result as highlighted number 1342

How can I achive this goal using splunk search

0 Karma

MuS
Legend

Hi akash_akkis,

if the number you need always occurs after the second , you can use something like this:

your base search here | rex "^(?:[^\,]*\,){2}(?<myField>([^\,]*))" | ...

This will get you a new field called myField which can be used further.

hope this helps ...

cheers, MuS

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...