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
Inscript
You are given a file emp.txt with the following contents

You execute the following command

How many lines will be printed as output?
You are given a file emp.txt with the following contents
You execute the following command
How many lines will be printed as output?
Solution
Inscript
What will be the output of the following command?

What will be the output of the following command?
Solution
Inscript
What is the output after executing the following shell script?

What is the output after executing the following shell script?
Solution
Inscript
What is the output after executing the following shell script?

What is the output after executing the following shell script?
Solution
Inscript
A developer runs the following shell commands to create a directory structure and count the number of files present:

Counts number of files found.
A developer runs the following shell commands to create a directory structure and count the number of files present:
Counts number of files found.
Solution
Inscript
A data analyst is processing a file that contains product categories and sales values:

They run the following awk script:

What is the output produced by the above command?
A data analyst is processing a file that contains product categories and sales values:
They run the following awk script:
What is the output produced by the above command?
Solution
Inscript
A commit tree has

Total number of Git objects stored = ?
A commit tree has
Total number of Git objects stored = ?
Solution
When the following shell command is executed

How many lines get printed?
How many lines get printed?
Solution
After executing the following shell script

What is printed on the terminal?
What is printed on the terminal?
Solution
Consider the following script

What is the purpose of the above script?
What is the purpose of the above script?
Solution
A research team collected responses stored in a file called
The file contains the following entries:

They apply the following sed script named
:

The command executed is:

How many lines are there in the final output?
They apply the following sed script named
The command executed is:
How many lines are there in the final output?
Solution
A DevOps engineer wants to check whether the keyword foo appears in a log file named file.txt before triggering an alert. They use the following Bash command:

When does YES print?
When does YES print?
Solution
A developer creates the following Makefile in an empty project directory:

They now run the command for the first time:

How many shell commands will be executed by make?
They now run the command for the first time:
How many shell commands will be executed by make?
Solution
If two developers clone the same remote repository and independently create commits on the same file and push without pulling, what will happen?
Solution
After executing the following script

Which of the given options are TRUE?
Which of the given options are TRUE?
Solution
A system administrator is troubleshooting DNS resolution delay on a Linux server. To quickly check the resolved IP address of a domain without unnecessary verbose output, the admin runs the following command

Which of the following statements are TRUE about the command?
Which of the following statements are TRUE about the command?
Solution
A system administrator adds the following entry in the crontab to automate report generation:

Which of the following statements are TRUE?
Note:- the following is the Cron format

Which of the following statements are TRUE?
Note:- the following is the Cron format
Solution
A DevOps engineer writes the following shell script to check whether a string variable is lexicographically greater than the value "b" before proceeding with a deployment step:

The script is executed in a Linux environment.
What is the result of executing the above script?
The script is executed in a Linux environment.
What is the result of executing the above script?
Solution
Comprehension Passage
Consider the following data to answer the given sub-questions.
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 :
If an employee ID is missing in the attendance file, what happens?
Solution
Comprehension Passage
Consider the following data to answer the given sub-questions.
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 present variable is?
The Value of the present variable is?
Solution
Shape
Thickness [ / ]
3
All colors