2/5/23, 5:25 PM Study Material
8.Advance Scripting
1) The _________ are used for routine system administrative tools.
A ) command
B ) shellscript
C ) function
D ) none
Answer: shellscript
2) In Linux all programs are executed as _________.
A ) process
B ) id
C ) security
D ) general
Answer: process
3) Each process when started has a unique number associated with it known as ______.
A ) UID
B ) CID
C ) PID
D ) MID
Answer: PID
4) To see the processes associated with the current shell we can issue the _________ command
without any parameter.
A ) id
B ) pn
C ) ps
D ) ss
Answer: ps
5) Administrative can view the process of all the users by using the _________command.
A ) ps –ef
B ) ps –es
C ) id –pf
D ) id –es
Answer: ps –ef
6) _________ indicates the parents process id process columns.
A ) UID
B ) PID
C ) TTY
D ) PPID
Answer: PPID
7) To remove process from memory _________ command is use
A ) del
B ) kill
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 1/8
2/5/23, 5:25 PM Study Material
C ) rem
D ) delete
Answer: kill
8) There are ________ numbers of decision making Instruction in Linux
A ) one
B ) two
C ) three
D ) four
Answer: four
9) Condition in if statements are written in ___________ brackets
A ) {}
B ) []
C ) ()
D ) none of them
Answer: []
10) if statement is ended with _________ statement
A ) fi
B ) end
C ) close
D ) }
Answer: fi
11) The exit status of command is __________ if it has been executed successfully.
A ) 1
B ) 100
C ) 0
D ) 11
Answer: 0
12) when if statement condition is true then statement typed under ______ statement is executed.
A ) if
B ) then
C ) after
D ) before
Answer: then
13) Compare both the file using _______ command is used.
A ) equal
B ) crp
C ) equal to
D ) cmp
Answer: cmp
14) Else if statement in Linux is written as _______.
A ) elif
B ) end if
C ) if else
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 2/8
2/5/23, 5:25 PM Study Material
D ) none of them
Answer: elif
15) Linux also provide _______ command which can be used in place of square bracket of if statement.
A ) sp
B ) test
C ) nt
D ) sq
Answer: test
16) The numerical test is performed using _________operators.
A ) logical
B ) bitwise
C ) relation
D ) comma
Answer: relation
17) The options _________ refers to relational operators.
A ) -ge
B ) -lt
C ) -gt
D ) All of them
Answer: All of them
18) Relational operators are used to compare values of _______ numeric operands.
A ) one
B ) two
C ) three
D ) three
Answer: two
19) To combine conditions user make a use of _________ operators.
A ) logical
B ) relation
C ) comma
D ) increment
Answer: logical
20) _______ operator is used for logical testing of AND.
A ) -a
B ) -o
C ) !
D ) -^
Answer: -a
21) _______ operator is used for logical testing of OR.
A ) -a
B ) -o
C ) !
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 3/8
2/5/23, 5:25 PM Study Material
D ) -^
Answer: -o
22) _______ operator is used for logical testing of NOT.
A ) -a
B ) -o
C ) !
D ) -^
Answer: !
23) __________ operators that allows us to check the status of a file.
A ) comma
B ) file
C ) condition
D ) none
Answer: file
24) __________ operators is used to check the specified file name is exist and has size greater than 0.
A ) -f name
B ) –r name
C ) -s name
D ) -w name
Answer: -s name
25) ____ operators is used to check the specified file name is exist and is not a directory.
A ) -f name
B ) –r name
C ) -s name
D ) -w name
Answer: -f name
26) ____ operators is used to check the specified file name is a directory.
A ) -f name
B ) –r name
C ) -s name
D ) -d name
Answer: -d name
27) ____ operators is used to check the specified file name is exist and user has execute permission
on it.
A ) -f name
B ) –x name
C ) -s name
D ) -d name
Answer: –x name
28) The _________ statement looks clumsy as number of comparison grows.
A ) if-then-elif-then-else-fi
B ) switch
C ) for
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 4/8
2/5/23, 5:25 PM Study Material
D ) while
Answer: if-then-elif-then-else-fi
29) The alternate option of elif statement is ________ statement.
A ) if
B ) case
C ) for
D ) non
Answer: case
30) The end of case statement is specified by ________ keyword.
A ) fi
B ) elif
C ) esac
D ) any one
Answer: esac
31) In case all the statements written within that section are executed till two ______are encountered
A ) : :
B ) ; ;
C ) , ,
D ) " "
Answer: ; ;
32) In case statement if user entered wrong choice automatic it transferred at ___ section.
A ) *
B ) $
C ) #
D ) %
Answer: *
33) The process of repeating the same commands number of times is known as _______
A ) Condition
B ) decision
C ) looping
D ) none
Answer: looping
34) Linux namely provides _______ keywords to perform repetitive actions.
A ) for
B ) while
C ) do-while
D ) all of them
Answer: all of them
35) The ______ loop allows us to specify a list of values in its statement.
A ) for
B ) while
C ) do-while
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 5/8
2/5/23, 5:25 PM Study Material
D ) none
Answer: for
36) _______ command is used to compress and uncompress your files.
A ) zar
B ) tar
C ) tz
D ) zip
Answer: tar
37) ______ loop runs till the condition is true.
A ) do
B ) if
C ) while
D ) none
Answer: while
38) The ________ loop executes till the condition is false.
A ) until
B ) for
C ) while
D ) all of them
Answer: until
39) _______ loop is as similar as the while loop
A ) for
B ) do
C ) until
D ) none
Answer: until
40) Linux shell script also provides us the feature of creating _______.
A ) function
B ) object
C ) class
D ) none
Answer: function
41) _________ are small subscripts within a shell script.
A ) statement
B ) variable
C ) function
D ) group
Answer: function
42) Using ____ we can improve the overall readability of the scripts.
A ) operator
B ) function
C ) variable
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 6/8
2/5/23, 5:25 PM Study Material
D ) none
Answer: function
43) The function used in shell script do not return _____.
A ) variable
B ) value
C ) ans
D ) none
Answer: value
44) The function returns the ________.
A ) value
B ) file
C ) A & B
D ) status code
Answer: status code
45) ______ character denotes the default case in case statement
A ) /
B ) *
C ) $
D ) #
Answer: *
46) ________ condition is used to check less than comparison in Linux.
A ) ge
B ) gt
C ) -lt
D ) le
Answer: -lt
47) ____ can be used in place of square brackets used in if condition.
A ) test
B ) fi
C ) for
D ) while
Answer: test
48) __________ should be typed below if statement.
A ) next
B ) then
C ) after
D ) done
Answer: then
49) do and done statements is used in __________ loop .
A ) for
B ) while
C ) untile
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 7/8
2/5/23, 5:25 PM Study Material
D ) all of them
Answer: all of them
50) ‘Else if’ is written in __________ way in if condition.
A ) efi
B ) li
C ) elif
D ) none
Answer: elif
www.ameecomputerclass.in
www.ameecomputerclass.in/sws-manager/download_material_mcq_print.php 8/8