Splunk Search

How to calculate the total number of words in a sentence ?

Engager

The end result has to be like this

0 Karma

SplunkTrust
SplunkTrust

Try this. It assumes you've already extracted the sentence into the field "sentence".

... | eval count=mvcount(split(sentence," ")) | ...
---
If this reply helps you, an upvote would be appreciated.
0 Karma