Winter Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

Exam 010-160 All Questions
Exam 010-160 All Questions

View all questions & answers for the 010-160 exam

LPI Linux Essentials 010-160 Question # 7 Topic 1 Discussion

010-160 Exam Topic 1 Question 7 Discussion:
Question #: 7
Topic #: 1

The file script.sh in the current directory contains the following content:

#!/bin/bash echo $MYVAR

The following commands are used to execute this script:

MYVAR=value

./script.sh

The result is an empty line instead of the content of the variable MYVAR. How should MYVAR be set in order to make script.sh display the content of MYVAR?


A.

!MYVAR=value


B.

env MYVAR=value


C.

MYVAR=value


D.

$MYVAR=value


E.

export MYVAR=value


Get Premium 010-160 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.