Splunk Search

Adding tab character \t to a string

paramagurukarth
Builder

I am trying to export data from splunk using splukCLI as given here 

 

splunk search "index=_internal earliest=09/14/2015:23:59:00 latest=09/16/2015:01:00:00 " -output rawdata -maxout 200000 > c:/test123.dmp 

 

Just want to print event fields seperated by tab character instaed of '\t' as string

tried something like 

 

...eval _raw=field1 + "<tabchar_copied_from_notpad>" + field2 + ...

 

Results in improper character whcih behaves differently in different OS

and 

 

...eval _raw=field1 + "\t" + field2 + ...

 

Results in "\t" avaiable in _raw as regular two characters.. not as a single tab character
Any cleaner way to achieve it

 

Labels (1)
0 Karma

paramagurukarth
Builder

I am just trying to feed data into another repoerting solution that uses fielbeat. That monitors log files. Plan is to feed the exported content to filebeat

0 Karma

tshah-splunk
Splunk Employee
Splunk Employee

Hey @paramagurukarth,

I think you can achieve that in a better way if the results are exported in CSV or JSON or XML format. It would be quite simpler to separate the fields based on delimiter instead of tab characters. If there is any specific use case or reason for exporting the data into rawdata format, please feel free to share the details.

---
If you find the answer helpful, an upvote/karma is appreciated
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...