Linux OS Shell Question:
Download Questions PDF

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

Linux Shell Interview Question
Linux Shell Interview Question

Answer:

b) 1.Unix 2.Unix 3.$os 4.Unix

Download Linux Shell Interview Questions And Answers PDF

Previous QuestionNext Question
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
Create a new file "new.txt" that is a concatenation of "file1.txt" and "file2.txt"?
a) cp file.txt file2.txt new.txt
b) cat file1.txt file2.txt > new.txt
c) mv file[12].txt new.txt
d) ls file1.txt file2.txt | new.txt