Problem

Consider the following shell script: echo -e "What is your favorite color?--> \c...

Consider the following shell script:

echo -e "What is your favorite color?--> \c"

read REPLY

if [ "$REPLY" = "red" –o "$REPLY" = "blue" ]

then

echo "The answer is red or blue."

else

echo "The answer is not red nor blue."

fi

1. What would be displayed if a user executes the program and answers Blue when prompted?

a. The answer is red or blue.

b. The answer is neither red nor blue.

c. The code would cause an error.

d. The answer is red or blue. The answer is not red nor blue.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 7