1.

Which of the following is an invalid variable?(a) _user(b) us01(c) -txtfile(d) txt123The question was asked by my college professor while I was bunking the class.My enquiry is from Command Substitution and Shell Variables topic in division The Shell of Unix

Answer»

Correct option is (c) -txtfile

The explanation is: UNIX restricts some RULE for defining a VARIABLE. A variable name MUST BEGIN with either an underscore (_) or alphanumeric character followed by ONE or more alphanumeric or underscore characters.



Discussion

No Comment Found

Related InterviewSolutions