Splunk Search

formatting query onto multiple lines in search bar

bdesatnik
New Member

I'm trying to format the query in the search bar so it appears on multiple lines (for easier readability).

From this:
sourcetype=iis cs_host="test.com" NOT c_ip="92.111*" | timechart span=1d dc(cs_username) AS User_Count | eval Date=strftime(_time, "%Y-%m-%d") | eval User_Count=tostring(User_Count, "commas") | rename User_Count as "User Count" | table Date, "User Count"

To this:
sourcetype=iis cs_host="test.com" NOT c_ip="92.111*"
| timechart span=1d dc(cs_username) AS User_Count
| eval Date=strftime(_time, "%Y-%m-%d")

| eval User_Count=tostring(User_Count, "commas")
| rename User_Count as "User Count"
| table Date, "User Count"

Is there a shortcut key that will work to split the query into multiple lines? Pressing Enter in the search bar just runs the search.

Thank you.

Tags (1)
0 Karma
1 Solution

aweitzman
Motivator

Pressing "Shift-Enter" works for me.

View solution in original post

bdesatnik
New Member

That worked - thank you!!

0 Karma

aweitzman
Motivator

Glad to hear it. Feel free to mark it as the answer so other people know that this question has been answered.

0 Karma

aweitzman
Motivator

Pressing "Shift-Enter" works for me.

obaf
New Member

If you are using newer version of Splunk, then Ctrl + \

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...