ExamGecko
Question list
Search
Search

Question 165 - SPLK-1002 discussion

Report
Export

The macro weekly_sales (2) contains the search string:

index---games I eval Product Sales = $price$ $AmountS01d$

Which of the following will return results?

A.
'weekly_sales(3.99, 10) '
Answers
A.
'weekly_sales(3.99, 10) '
B.
'weekly_sales($3.99$, $10$)
Answers
B.
'weekly_sales($3.99$, $10$)
C.
'weekly_sales (3.99, 10)
Answers
C.
'weekly_sales (3.99, 10)
D.
'weekly_sales(3)
Answers
D.
'weekly_sales(3)
Suggested answer: C

Explanation:

The correct answer is C. 'weekly_sales (3.99, 10)'. This is because search macros accept arguments without quotation marks or dollar signs, and the number of arguments must match the number of parameters defined in the macro. The other options are incorrect because they either use quotation marks or dollar signs around the arguments, or they provide a different number of arguments than the macro expects. You can learn more about how to use search macros in searches from the Splunk documentation1.

asked 23/09/2024
Lukas Reker
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first