nerdexam
Splunk

SPLK-1002 · Question #212

How are arguments defined within the macro search string?

The correct answer is A. arg$. In Splunk, macro arguments are referenced in the search string using dollar signs surrounding the argument name: $argname$. Answer A represents this $arg$ syntax. When the macro is executed, Splunk substitutes each $argname$ placeholder with the value provided at runtime. The…

Creating and Using Macros

Question

How are arguments defined within the macro search string?

Options

  • Aarg$
  • B'arg'
  • C%arg%
  • D"arg"

How the community answered

(43 responses)
  • A
    88% (38)
  • B
    7% (3)
  • C
    2% (1)
  • D
    2% (1)

Explanation

In Splunk, macro arguments are referenced in the search string using dollar signs surrounding the argument name: $argname$. Answer A represents this $arg$ syntax. When the macro is executed, Splunk substitutes each $argname$ placeholder with the value provided at runtime. The other notations ('arg', %arg%, "arg") are not valid Splunk macro argument syntax.

Topics

#Splunk macros#macro arguments#macro syntax

Community Discussion

No community discussion yet for this question.

Full SPLK-1002 Practice