Linux OS Shell Question:
Download Questions PDF

What is the output of the following program?

b =
[ -n $b ]
echo $?
[ -z $b ]
echo $?
a) 1
1
b) 2
2
c) 0
0
d) 0
1

Linux Shell Interview Question
Linux Shell Interview Question

Answer:

c) 0
0

Download Linux Shell Interview Questions And Answers PDF

Previous QuestionNext Question
The expression expr -9 % 2 evaluates to:
a) 0
b) 1
c) -1
d) 2
What is the output of the following code:

os=Unix
echo 1.$os 2."$os" 3.'$os' 4.$os

a) 1.Unix 2.Unix 3.Unix 4.Unix
b) 1.Unix 2.Unix 3.$os 4.Unix
c) 1.Unix 2.Unix 3.Unix 4.$os
d) 1.Unix 2.$os 3.$os 4.$os