010-160 practice question 5 of 15
The file script.sh in the current directory contains the following content: #!/bin/bash echo $MYVAR The following commands are used to execute this…
Choose your answer, then check it against the explanation.
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?
Question 5 of 15
Keep practicing
Take the free 010-160 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 010-160 practice questions
- Question 1What can be found in the /proc/ directory?
- Question 2Which permissions are set on a regular file once the permissions have been modified with …
- Question 3Which of the following commands puts the lines of the file data.csv into alphabetical ord…
- Question 4Which of the following programs are web servers? (Choose two.)
- Question 6Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.1…
- Question 7The current directory contains the following file: -rw-r—r— 1 root exec 24551 Apr 2 12:36…
