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…
Question
How are arguments defined within the macro search string?
Options
- Aarg$
- B'arg'
- C%arg%
- D"arg"
How the community answered
(43 responses)- A88% (38)
- B7% (3)
- C2% (1)
- D2% (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
Community Discussion
No community discussion yet for this question.