The number of errors in the following shell script
echo How are you?
read $answer
is
A. | 0 |
B. | 1 |
C. | 2 |
D. | 3 |
Answer : C Explanation : Two mistakes. First is the ? . It is a meta character. So. when the shell encounters ? , it will try for a match, with the files in the current directory. made up of just one character. Use ? , to suppress the special meaning of ? . $answer means the value of the variable answer. Since you are reading the value of the variable answer, it should he read answer. |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |