- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remove spaces from all field names
aa70627
Communicator
05-29-2018
11:27 AM
Is there any quick way to remove specific at the beginning and end of all fields names? For example i am looking looking to remove all spaces to the left and right of all field names. How do i do this?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ifathklein
Engager
07-07-2020
06:24 AM
foreach * [ eval newFieldName=replace("<<FIELD>>", "\s+", "_"), {newFieldName}='<<FIELD>>' ] | fields - "* *", newFieldName
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
romedome
Path Finder
10-20-2023
12:48 AM
Very smart! Thanks!
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

niketn
Legend
05-29-2018
09:33 PM
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
xpac

SplunkTrust
05-29-2018
12:14 PM
Can you show an example of what you have right now, and how you would like it to be?
