Question 120
A trainee wants to know whether cd is a Bash built-in rather than an external executable. One student proposes Run type cd and another proposes Write "$filename" when passing the variable. Which technical comparison is the soundest?
Explanation
Correct Answer
Correct distinction: Run type cd targets command type discovery; type reports how Bash resolves the specified command name. The compared alternative instead serves double-quoted whitespace safety.
Incorrect Answers
Incorrect mapping: Write "$filename" when passing the variable is used for double-quoted whitespace safety. It does not displace Run type cd for the described requirement.
The mechanisms are different: type reports how Bash resolves the specified command name. By contrast, Double-quoting parameter expansion prevents word splitting of spaces in the filename. They are not universally interchangeable.
The third option addresses PATH executable lookup: PATH contains directories the shell searches when resolving external commands. The original action remains relevant because type reports how Bash resolves the specified command name.