Splunk Search

Issue adding a symbol after a field value

UMDTERPS
Communicator

The following previous splunk thread works fine:

https://community.splunk.com/t5/Archive/Insert-sign-for-each-result-in-a-specific-column/m-p/149167


| eval sensor = sensor + " %"
51%


However,  if the field name has a space, it does not work:

| eval "System Outlook" = "System Outlook" + " %"
System Outlook %

 

I'm assuming it needs some sort of backslash escaping? (I've tried a bunch of ways). I know I can just rename it without the space, but I want to keep the space.

Any ideas?

Labels (2)
Tags (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

When using field names with non standard characters, you need to use single quotes on the right hand side of the eval statement, i.e.

| eval "System Outlook" = 'System Outlook' + " %"

 

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

When using field names with non standard characters, you need to use single quotes on the right hand side of the eval statement, i.e.

| eval "System Outlook" = 'System Outlook' + " %"

 

UMDTERPS
Communicator

Perfect, that worked!

 

Thanks!😀

Tags (1)
0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...