An administrator notices the HISTSIZE variable is 50, using the commands below:
HISTSIZE=50
export HISTSIZE The administrator rechecks the HISTSIZE value using echo HISTSIZE but gets no value. Which of the following commands should the administrator use to retrieve its value?
A. printenv | grep $HISTSIZE
B. echo HISTSIZE
C. printf HISTSIZE
D. grep $HISTSIZE
~~~~~~~~ Wed Mar 10 16:49:38 ~
# echo $HISTSIZE
1000
~~~~~~~~ Wed Mar 10 16:49:59 ~
# printenv | grep $HISTSIZE
HISTSIZE=1000
~~~~~~~~ Wed Mar 10 16:50:21 ~
# echo HISTSIZE
HISTSIZE
~~~~~~~~ Wed Mar 10 16:50:35 ~
# printf HISTSIZE
HISTSIZE
~~~~~~~~ Wed Mar 10 16:52:04 ~
# grep $HISTSIZE
^C
~~~~~~~~ Wed Mar 10 16:52:45 ~
#
echo $HISTSIZE
It cant be echo HISTSIZE because its missing the $, hence why the answer is A, while yes echo $HISTSIZE works, the command as shown by command will not work without the $. Just to be clear