What is the output of this program?
#!/bin/bash
test_var="Example"
echo "$test_var"
echo '$test_var'
echo '"$test_var"'
echo "'$test_var'"
echo \$test_var
exit 0
#!/bin/bash
test_var="Example"
echo "$test_var"
echo '$test_var'
echo '"$test_var"'
echo "'$test_var'"
echo \$test_var
exit 0A. Example
$test_var
"$test_var"
'Example'
$test_var
B. Example
Example
"Example"
'Example'
Example
C. program will generate an error message
D. program will print nothing
Answer: Option A

Join The Discussion