Splunk® Cloud Services

SPL2 Search Manual

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Combining commands

You can combine commands. The pipe ( | ) character is used to separate the syntax of one command from the next command.

The following example reads from the main dataset and then pipes that data to the eval command. You use the eval command to calculate an expression. The results of that expression are placed into a field in the search results that are returned to you.

This search takes the data in the bytes field in the main dataset and converts the bytes into kilobytes. The results are stored in a new field called kbytes.

| from main | eval kbytes = bytes / 1024


Next step

See Grouping search results.

Last modified on 21 April, 2020
PREVIOUS
Searching specific time ranges
  NEXT
Grouping search results

This documentation applies to the following versions of Splunk® Cloud Services: current


Was this documentation topic helpful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters