1.

Which symbol is used with the set command for command substitution?(a) –(b) —(c) ??(d) _The question was posed to me in semester exam.This intriguing question originated from Shell Programming using Various Commands topic in section Essential Shell Programming of Unix

Answer»

Correct answer is (b) —

For EXPLANATION I would say: set statement can also be used for command substitution. There can be a PROBLEM especially when the OUTPUT of the command BEGINS with a-.It may happen that set INTERPRETS it as an option. To avoid this condition, we have to use — (double hyphen) immediately after set. For example,



Discussion

No Comment Found

Related InterviewSolutions