You can always press Enter⏎ to continue
Shell Scripting Quiz
1
Instructions For Quiz
This Mock Test has 15 Questions
Each Question is of 1 marks so total 15 marks
Multiple Choice Questions with only ONE valid answer
Previous
Next
Submit
Press
Enter
2
1) ______ shows the count of the arguments passed to the script.
*
This field is required.
%#
$#
$$
%$
Previous
Next
Submit
Press
Enter
3
2) Which of the following is not a Shell ?
*
This field is required.
Bourne
Bash
Ksh
Bat
Previous
Next
Submit
Press
Enter
4
3) Which sign considers the entire set of positional parameters as a single string?
*
This field is required.
$*
$#
%$
$@
Previous
Next
Submit
Press
Enter
5
4) How will you find the 99th line of a file using only tail and head command?
*
This field is required.
tail +99 file1head -1
tail -99 file1head -1
tail 99 file1head 1
tail +99 file1
Previous
Next
Submit
Press
Enter
6
5) Print the 10th line without using tail and head command.
*
This field is required.
sed n 10p file1
print -10 file 1
sed n file1
sed file1
Previous
Next
Submit
Press
Enter
7
6) Which command is find out how long the system has been running?
*
This field is required.
Continue
Running
Uptime
Current
Previous
Next
Submit
Press
Enter
8
7) Which sign shows the process id of the process that recently went into background.
*
This field is required.
$!
$*
$$
%$
Previous
Next
Submit
Press
Enter
9
8) Given a file find the count of lines containing word .
*
This field is required.
grep c- "ABC" file1
grep file1
grep c file1
grep file1
Previous
Next
Submit
Press
Enter
10
9) Which sign gives the exit status of the last command that was executed?
*
This field is required.
$?
$#
$$
$!
Previous
Next
Submit
Press
Enter
11
10) How can you set the default rwx permission to all users on every file which is created in the current shell?
*
This field is required.
umask 555
umask 666
umask 777
umask 888
Previous
Next
Submit
Press
Enter
12
11) How can we find the process name from its process id?
*
This field is required.
ps p ProcessId
ps p ProcessId
pidof ProcessId
ps p- ProcessId
Previous
Next
Submit
Press
Enter
13
12) Which Block contains the inode for every file of the file system along with all the file attributes except its name?
*
This field is required.
boot block
datablock
super block
inode block
Previous
Next
Submit
Press
Enter
14
13) How will I insert a line at every 100th line of a file?
*
This field is required.
sed 100i\\ABCDEF file1
sed 100\\ABCDEF file1
sed 100i/ABCDEF file1
sed =100i\\ABCDEF.file1
Previous
Next
Submit
Press
Enter
15
14) How do u open a read only file in Unix?
*
This field is required.
vi filename
open filename
read filename
vi(filename)
Previous
Next
Submit
Press
Enter
16
15) How do you stop a process?
*
This field is required.
breck
ds pid
stop
kill pid
Previous
Next
Submit
Press
Enter
Should be Empty:
Question Label
1
of
16
See All
Go Back
Submit