1Z0-821 practice question 19 of 30

What is the output of the following command, if executed using the default shell for the root role account of a standard Live CD Install of Oracle Solaris 11? echo '$SHELL'

Full set: 243 questions
Answer options
A: /usr/bin/bash
B: /usr/bin/ksh
C: $SHELL Correct answer
D: the PID for the current shell
Correct Answer:
C. $SHELL
Explanation

Single quotes are most strict. They prevent even variable expansion. Double quotes prevent wildcard expansion but allow variable expansion. For example:
#!/bin/sh
echo $SHELL echo "$SHELL" echo '$SHELL' This will print: /usr/bin/bash /usr/bin/bash $SHELL

Scroll to Top