Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DIPLOMA LEVEL : SYSTEM COMMANDS
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
The following entry is made to crontab.

At what time does the script run
Note : the following is the Cron format

At what time does the script run
Note : the following is the Cron format
Solution
What will be the output of the following command:

Solution
What is the output after executing the following script?

Solution
A system administrator receives a daily application log file where the most recent entries appear at the bottom, but the monitoring dashboard requires the latest entries to appear at the top for quick analysis.
Instead of manually editing the file, the admin executes the following sed command on the log file

What does the above sed script do to the contents of the file?
Instead of manually editing the file, the admin executes the following sed command on the log file
What does the above sed script do to the contents of the file?
Solution
A data engineer has a text file where each record appears on a separate line, but a legacy reporting system requires all the data to be sent as a single-line input with values separated by spaces.
To achieve this transformation, the engineer runs the following sed command

What is the purpose of the above sed script?
To achieve this transformation, the engineer runs the following sed command
What is the purpose of the above sed script?
Solution
A system administrator writes the following shell script to test whether a remote host is reachable before initiating a backup process

The command sends 1 ICMP packet to the host 192.0.2.1
All output is redirected to /dev/null
The script then prints the exit status of the previous command using $?
If the host is unreachable, what will be the output of the script?
The command sends 1 ICMP packet to the host 192.0.2.1
All output is redirected to /dev/null
The script then prints the exit status of the previous command using $?
If the host is unreachable, what will be the output of the script?
Solution
A polling system records votes using single-letter category codes.
However, some users enter their votes in uppercase while others use lowercase.
To count votes for category 'a' in a case-insensitive manner, the analyst runs the following awk script

Input

What is the output produced by the above script?
However, some users enter their votes in uppercase while others use lowercase.
To count votes for category 'a' in a case-insensitive manner, the analyst runs the following awk script
Input
What is the output produced by the above script?
Solution
A system administrator creates the following script named cleanup.sh to prevent the application log file from growing too large :

If the file app.log initially contains 1800 lines, how many lines will remain after executing the script?
If the file app.log initially contains 1800 lines, how many lines will remain after executing the script?
Solution
A developer writes the following Bash script to process all .txt files present in the current working directory :

The script is executed in a directory that currently contains no .txt files.
What is the output produced after running the above script?
The script is executed in a directory that currently contains no .txt files.
What is the output produced after running the above script?
Solution
Inscript
When the following shell command is executed:

How many lines are printed?
When the following shell command is executed:
How many lines are printed?
Solution
Inscript
What is the output after executing the shell script

What is the output after executing the shell script
Solution
Inscript
A data engineer is given a file file.txt containing product names collected from multiple sources.
The file may contain:
- Comment lines starting with #
- Blank lines
- Extra spaces
- Repeated consecutive duplicate entries
the contents of the file.txt are :

To clean this data, the engineer runs the sed script named s1_10.sed:

The above script is run using the command

How many lines are printed after executing the above script?
A data engineer is given a file file.txt containing product names collected from multiple sources.
The file may contain:
- Comment lines starting with #
- Blank lines
- Extra spaces
- Repeated consecutive duplicate entries
the contents of the file.txt are :
To clean this data, the engineer runs the sed script named s1_10.sed:
The above script is run using the command
How many lines are printed after executing the above script?
Solution
Inscript
A repository has:

How many total commits will exist after all merges?
A repository has:
How many total commits will exist after all merges?
Solution
After executing the following shell script

Which of the following statements are true?
Which of the following statements are true?
Solution
Consider the directory that contains the files :



Which statements are true after executing the following script

Which statements are true after executing the following script
Solution
A security analyst is scanning log entries to detect strings where a substring is immediately repeated (e.g., patterns like abab = ab + ab).
To filter such entries, the analyst runs the following command :

Which of the following lines match and appear in the output?
To filter such entries, the analyst runs the following command :
Which of the following lines match and appear in the output?
Solution
Consider the files f1 and f2 with their content
File f1 with content :

File f2 with content :

If the following awk command is executed

Select all correct statements
File f1 with content :
File f2 with content :
If the following awk command is executed
Select all correct statements
Solution
Which commands can create a new branch reference?
Solution
Comprehension Passage
Consider the following data to answer the given subquestions.
The employees.txt file contains the following data:

The attendance.txt file contains the following data:

And the script report.awk is :

Run the script report.awk as :

The employees.txt file contains the following data:
The attendance.txt file contains the following data:
And the script report.awk is :
Run the script report.awk as :
Inscript
How many employees receive bonuses?
How many employees receive bonuses?
Solution
Comprehension Passage
Consider the following data to answer the given subquestions.
The employees.txt file contains the following data:

The attendance.txt file contains the following data:

And the script report.awk is :

Run the script report.awk as :

The employees.txt file contains the following data:
The attendance.txt file contains the following data:
And the script report.awk is :
Run the script report.awk as :
Inscript
The Value of the absent variable is?
The Value of the absent variable is?
Solution
Shape
Thickness [ / ]
3
All colors