Splunk Core Certified Power User — Question 131

Which of the following eval commands will provide a new value for host from src if it exists?

Answer options

Correct answer: D

Explanation

The correct answer D works because it checks if src is not null and assigns its value to host if true. Option A incorrectly uses '*' instead of '=', and does not provide the desired functionality. Option B compares src to host rather than checking if src is null, while option C uses a negation that does not meet the requirement.