Which command will display the value of a variable named TMPDIR?
A.
val $TMPDIR
B.
echo STMPDIR
C.
echo TMPDIR'
D.
val "STMPDIR"
E.
echo TMPDIR
F.
show "STMPDIR'"
G.
echo 'STMPDIR'
The Answer Is:
E
This question includes an explanation.
Explanation:
The command that will display the value of a variable named TMPDIR is echoTMPDIR.Theechocommandwillprintitsargumentstothestandardoutput.Thesign is used to reference the value of a variable in bash. If you omit the $ sign, echo will print the name of the variable instead of its value. If you use single quotes around the variable name, echo will also print the name instead of its value. If you use double quotes around the variable name, echo will print its value as expected. References:https://documentation.suse.com/sles/15-SP3/html/SLES-all/cha-bash.html#sec-bash-variables
sca_sles15 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"