subject

Consider the following valid shell script:

#1 /bin/bash
sum= 0
TMP1-./TMP1
echo -e "81n7\n6" $TMP1

while read num
do

echo "TRACE: In Loop"
echo "TRACE: num: $num"
sum- expr $sum $num
echo "TRACE: sum: $sum"
echo -e "TRACE: End of Loop\n"
done < $TMP1

Which one of the following statements is correct: Group of answer choices

a. The contents of the file TMP1 will be read into the while loop.
b. This script will exit with an error, because no file named TMP1 will exist when the while loop runs.
c. The variable sum will contain the value 23 at the end of the script, just before it exits and is unloaded from memory.
d. The first line has no effect: whatever shell you run this script from will be the shell of execution, not the one indicated in the first line.
e. The backtick characters in the line with sum and expr can be replaced with double quote characters, like so; sum-"expr $sum+ Snum", and the numerical summation intended will still occur.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
You know the right answer?
Consider the following valid shell script:

#1 /bin/bash
sum= 0
TMP1-./TMP1...
Questions
question
Mathematics, 21.04.2021 18:00
question
Mathematics, 21.04.2021 18:00
Questions on the website: 13722367