System Commands End Term: 28 April 2024, Set QDF1 (January 2024 term)
The IIT Madras BS System Commands (System Commands) End Term paper sat on 28 Apr 2024, in the January 2024 term, set QDF1: 15 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.
- 15
- 100
- 180 min
- 9
- 1
- 1
- 4
Show answer
Correct answer
Question 2
Show answer
Correct answer
Question 3
Prints the count of even numbers between 10 and 20.
Prints the count of odd numbers between 10 and 20.
Prints the sum of even numbers between 10 and 20.
Prints the sum of odd numbers between 10 and 20.
Show answer
Correct answer
Prints the count of even numbers between 10 and 20.
Question 4
Show answer
Correct answer
Question 5
Show answer
Correct answer
Question 6
What environment variable stores the path to the user’s home directory?
Show answer
Correct answer
Question 7
Show answer
Correct answer
Question 8
Show answer
Correct answer
Question 9
Which AWK script from the options can count the frequency of each word if executed on a text file? Note: The text file contains only words separated by spaces.
Show answer
Correct answer
Question 10
Show answer
Correct answer: 5
Question 11
Show answer
Correct answer: World
Question 12
You want to find lines in a text file where the third field is a numeric value between 10 and 20 inclusive. Which command(s) would you use?
Show answer
Correct answers
Question 13
Select the correct option(s) to validate whether a string variable contains only digits in a bash script.
Show answer
Correct answers
Question 14
You're tasked with extracting phone numbers from a text document in the format of either (123) 456-7890 or 123-456-7890. Which regular expression (ERE) would you use to match both formats?
Show answer
Correct answers
Question 15
Show answer
Correct answers
