head command syntax details
Syntax
The required syntax is in bold.
- head
- [keeplast = (true | false)]
- [while "("<boolean-expression>")"]
- [<limit>]
Required arguments
None. If no options are specified, the head
command returns the first 10 results.
Optional arguments
- keeplast
- Syntax: keeplast=<boolean>
- Description: Use in conjunction with the
while
argument to determine whether the last result in the result set is retained. The last result returned is the result that caused the <boolean-expression> to evaluate to false or NULL. Setkeeplast=true
to retain the last result in the result set. Setkeeplast=false
to discard the last result. - Default: true
- limit
- Syntax: <integer>
- Description: The number of results to return.
- Default: 10
- while
- Syntax: while "("<boolean-expression>")"
- Description: A expression that evaluates to either
true
orfalse
, such as <field>=<value>. You cannot use statistical functions in the expression. - Default: false
See also
- head command
- head command overview
- head command usage
- head command examples
head command overview | head command usage |
This documentation applies to the following versions of Splunk® Cloud Services: current
Feedback submitted, thanks!