Which of the following commands should the administrator use to retrieve its value?

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

comptia-exams

3 thoughts on “Which of the following commands should the administrator use to retrieve its value?

  1. ~~~~~~~~ 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 ~
    #

    1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.