What output will be displayed when the user fred runs the following command?
fred
echo 'fred $USER'
Single quotes prevent shell parameter expansion, so $USER remains literal text. The shell removes the enclosing quotation marks before invoking echo, which prints fred $USER.
$USER
echo
fred $USER
Community Discussion