CompTIA
XK0-006 · Question #35
XK0-006 Question #35: Real Exam Question with Answer & Explanation
Sign in or unlock XK0-006 to reveal the answer and full explanation for question #35. The question stem and answer options stay visible for context.
Question
In the echo "profile-$num-$name" line of a shell script, the variable $num seems to not be expanding during execution. Which of the following notations ensures the value is expanded?
Options
- Aecho "profile-$(num)-$name"
- Becho 'profile-$num-$name'
- Cecho "profile-'Snum'-$name"
- Decho "profile-${num}-$name"
Unlock XK0-006 to see the answer
You've previewed enough free XK0-006 questions. Unlock XK0-006 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.