Which two settings will display the name of the variable and its value?

You want to display the value of a shell variable called service after assigning a value as
shown: SERVICE =ACCT S Which two settings will display the name of the variable and its
value?

You want to display the value of a shell variable called service after assigning a value as
shown: SERVICE =ACCT S Which two settings will display the name of the variable and its
value?

A.
set $SERVICE

B.
set | grep service

C.
echo $SERVICE

D.
env | grep SERVICE

E.
env $SERVICE



Leave a Reply 4

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


Olli

Olli

Are you sure this is correct? Answer C only returns the value of the variable, but not the name.

S Idris

S Idris

Hi all,

Thank you for all your effort and valuable comments.
I am going to sit the exam in 3 weeks. Can someone please verify if i can still use these questions to prepare for the exam?

Hector

Hector

Dependiendo de la forma de la definicio de la variable, las posibles respuestas correctas serian B y D,

Explicacion:

Definicion:
~$ export SERVICE=ACCTS

~$ env | grep SERVICE
SERVICE=ACCTS
~$ set | grep SERVICE
SERVICE=ACCTS

B.
set | grep SERVICE

D.
env | grep SERVICE

Jorge

Jorge

Hola Hector,
Tu ya realizaste este examen?

Saludos,