Question 1
8:30 only on weekdays
8:30, 9:30, 10:30 only on weekdays
Every 30 minutes
Every hour

The IIT Madras BS System Commands (System Commands) End Term paper sat on 10 May 2026, in the January 2026 term, set 1-2: 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.
8:30 only on weekdays
8:30, 9:30, 10:30 only on weekdays
Every 30 minutes
Every hour
Correct answer
8:30, 9:30, 10:30 only on weekdays
2
3
5
4
Correct answer
4
31/12/2025
2025/12/31
12/31/2025
unchanged
Correct answer
31/12/2025
Removes duplicate lines
Sorts the file alphabetically
Reverses the order of lines
Deletes the last line
Correct answer
Reverses the order of lines
Split lines
Join all lines into one
Reverse lines
Delete the newline at the end
Correct answer
Join all lines into one
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?
0
1
2
depends
Correct answer
1
What is the output produced by the above script?
1
2
3
6
Correct answer
3
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?
1000
1300
1800
500
Correct answer
500
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?
Correct answer
Correct answer: 4
What is the output after executing the shell script
Correct answer: 1
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:
Correct answer: 3
A repository has:
How many total commits will exist after all merges?
Correct answer: 21
After executing the following shell script
Which of the following statements are true?
total becomes the number of lines
total prints empty or 0
loop runs in a subshell
Correct answers
total prints empty or 0
loop runs in a subshell
First prints a.txt b.txt
First prints *.txt
Second prints *.txt
Second prints a.txt b.txt
Correct answers
First prints a.txt b.txt
Second prints *.txt
abab
abba
abcabc
none
Correct answers
abab
abcabc
Consider the files f1 and f2 with their content
File f1 with content :
File f2 with content :
Total output lines = 4
Total output lines = 5
First line of f2 prints 3 1
First line of f2 prints 3 3
NR continues counting across files
FNR resets for each file
Correct answers
Total output lines = 4
First line of f2 prints 3 1
NR continues counting across files
FNR resets for each file
Which commands can create a new branch reference?
git branch new
git checkout -b new
git reset --hard HEAD~1
git switch -c new
git clone
Correct answers
git branch new
git checkout -b new
git switch -c new
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 :
How many employees receive bonuses?
Correct answer: 3
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 :
The Value of the absent variable is?
Correct answer: 2