nerdexam
Oracle

1Z0-100 · Question #95

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?

The correct answer is B. echo $SERVICE C. env | grep SERVICE. C: env - set the environment for command invocation If no utility operand is specified, the resulting environment shall be written to the standard output, with one name= value pair per line.

Manage Software

Question

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?

Options

  • Aset | grep service
  • Becho $SERVICE
  • Cenv | grep SERVICE
  • Denv $SERVICE
  • Eset $SERVICE

How the community answered

(42 responses)
  • A
    2% (1)
  • B
    79% (33)
  • D
    12% (5)
  • E
    7% (3)

Explanation

C: env - set the environment for command invocation If no utility operand is specified, the resulting environment shall be written to the standard output, with one name= value pair per line.

Topics

#shell variables#environment variables#set command#env command

Community Discussion

No community discussion yet for this question.

Full 1Z0-100 Practice