Question 1
You are given a file emp.txt with the following contents

The IIT Madras BS System Commands (System Commands) End Term paper sat on 10 May 2026, in the January 2026 term, set 1: 20 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
You are given a file emp.txt with the following contents
Correct answer: 3
Correct answer: 6
What is the output after executing the following shell script?
Correct answer: 3
What is the output after executing the following shell script?
Correct answer: 0
A developer runs the following shell commands to create a directory structure and count the number of files present:
Counts number of files found.
Correct answer: 5
A data analyst is processing a file that contains product categories and sales values:
Correct answer: 30
A commit tree has
Total number of Git objects stored = ?
Correct answer: 22
2
4
1
Error
Correct answer
1
After executing the following shell script
What is printed on the terminal?
Hello World
World Hello
Hello
World
Correct answer
World Hello
Delete all duplicates
Remove adjacent duplicate lines
Sort lines
Remove blank lines
Correct answer
Remove adjacent duplicate lines
7
6
4
5
Correct answer
5
when file exists
when foo found
always
never
Correct answer
when foo found
A developer creates the following Makefile in an empty project directory:
1
2
3
0
Correct answer
2
If two developers clone the same remote repository and independently create commits on the same file and push without pulling, what will happen?
Last push overwrites previous
Remote automatically merges
Push rejected for non-fast-forward
Both commits are appended linearly
Correct answer
Push rejected for non-fast-forward
Output contains one N
Output contains two N
Output starts with N
Infinite loop
Correct answers
Output contains one N
Output starts with N
Shows only IPs
Shows full DNS trace
Suppresses headers
Faster output
Correct answers
Shows only IPs
Suppresses headers
Faster output
Runs 6 times daily
Standard error is redirected
Executes only in the morning hours
Log file is overwritten
Correct answers
Runs 6 times daily
Standard error is redirected
Executes only in the morning hours
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?
YES
NO
creates a file named b
syntax error
Correct answers
YES
creates a file named b
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 :
If an employee ID is missing in the attendance file, what happens?
Script crashes
days[id] becomes 0
Treated as present
Skipped
Correct answer
days[id] becomes 0
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 :
The Value of the present variable is?
Correct answer: 3