- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
atornes
Path Finder
11-05-2012
03:50 PM
How can I capitalize the first character of some string values using one of the eval or fieldformat operators?
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ayn
Legend
11-06-2012
01:49 AM
Off the top of my head (I have no Splunk instance to try this on at the moment), this should do it:
... | eval myfield = upper(substr(myfield,1,1)).substr(myfield,2)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ayn
Legend
11-06-2012
01:49 AM
Off the top of my head (I have no Splunk instance to try this on at the moment), this should do it:
... | eval myfield = upper(substr(myfield,1,1)).substr(myfield,2)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
scentoni_splunk

Splunk Employee
06-23-2015
03:56 PM
Try this
| eval myfield = upper(substr(myfield,1,1)).lower(substr(myfield,2))
