1.

Which of the following is false?(a) here document provides standard input to any script non interactively(b) read command is used for making scripts interactive(c) $* stores the number of arguments specified(d) && and || are logical operatorsThis question was addressed to me in my homework.I would like to ask this question from Shell Programming using Various Commands in section Essential Shell Programming of Unix

Answer»

Correct choice is (c) $* STORES the number of arguments specified

For EXPLANATION: The shell uses << symbol to read data from the same file containing the SCRIPT. This is referred to as a here document. read command allows us to TAKE input from the user to make the script interactive. && and || are logical operators which allow conditional execution. $* stores the complete set of positional parameters as a single string.



Discussion

No Comment Found

Related InterviewSolutions