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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:20, nina1390
How can you tell if someone sent you a text message to your email instead of a email
Answers: 1
image
Computers and Technology, 23.06.2019 04:00, ittmanny6138
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
image
Computers and Technology, 23.06.2019 08:00, seaotter7140
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
image
Computers and Technology, 24.06.2019 07:30, sunny644
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
You know the right answer?
Consider the following valid shell script:

#1 /bin/bash
sum= 0
TMP1-./TMP1...

Questions in other subjects: