QUESTION 16 You have a shell script variable declared as follows: title=\"TPS Re
ID: 3832420 • Letter: Q
Question
QUESTION 16
You have a shell script variable declared as follows:
title="TPS Report"
How would you reference this variable later in your script?
#title
_title_
title$
$title
QUESTION 17
You are writing a bash script, and want to place the output of the date command into a variable. Which line below accomplishes this task?
date > $d
d=$date
d=$(date)
d=exec(date)
QUESTION 18
In bash scripts, what are "local variables"?
Local variables are only accessible within the shell function in which they are defined and cease to exist once the shell function terminates.
Local variables cannot be access over the network.
Local variables only apply to the user running the script.
Local variables cannot contain output from outside programs.
QUESTION 19
The "if" conditional statement in bash shell scripts supports a variety of tests.
What is the purpose of the -w test?
To test if the file exists and is executable.
To test if the script is being run in a window.
To test if the function contains constant variables.
To test if the file exists and the user has write permissions.
QUESTION 20
In bash scripts, two pipes in a row is the equivient of which logical operator? It looks like ||
OR
NOT
LESS THAN
AND
a.#title
b._title_
c.title$
d.$title
Explanation / Answer
16. d
17. c
18. a
19. d
20 . a
--------------------------------------------------------------------------
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.