2. Which expression use the value of the enclosed arithmetic expression?
a) $(())
b) $()
c) ${}
d) $[]
a) $(())
b) a = a << b
b) 16
Explanation:
'**' is the exponentation operator in bash shell.
Output:
root@ubuntu:/home/google#./test.sh
16
root@ubuntu:/home/google#
c) 1
Firstly the '$a<0' condition has been checked. Because it is false hence the right hand side condition of the colon (:) has been checked and this is true so program output is 1.
b) 0
The condition '$a<0' is false so logical and operator provides the output 0.
a) 14
The operators in decreasing order of precedence are ++, **, *, +.
d) all of the mentioned
c) full list of all commands
b) removes all running jobs
b) disables the specified built-in command
18. Which command can create environment variable?
a) export
b) set
c) read
d) none of the mentioned
a) export
d) all of the mentioned
a) by entering "hello"