Linux OS Shell Question:
Download Questions PDF

Which one of the following is not a valid shell variable?
a) _san
b) san_2
c) _san_2
d) 2_san

Linux Shell Interview Question
Linux Shell Interview Question

Answer:

d) 2_san
Explanation:
The shell variable can contain only letters(a to z or A to Z), numbers(0 to 9), or a underscore character(_) and a variable can not start with a number.

Download Linux Shell Interview Questions And Answers PDF

Previous QuestionNext Question
Which one of the following statement is true about variables in shell?
a) variables do not require declaration before assigning value to them
b) variables are case sensitive
c) to extract the contents of a variable, we have to provide the variable a preceding $
d) all of the mentioned
In the shell, by default, all variables are considered and stored as:
a) string
b) integer
c) character
f) float