Quiz Space

System Commands OPPE 1: January 2026 (January 2026 term)

Question 1

+20 marksProgramming

Given a list of filenames (with extensions), one per line, count the number of files for each extension. Output format: count .ext, sorted by descending count, then by descending extension for ties.

Instructions

  • Write your script in script.sh.
  • Read from standard input, write to standard output.
  • Extensions are case-insensitive; output in lowercase.
  • Count column is right-aligned to 2 characters.

Sample Input

hello.txt
bye.pdf
cats.txt
video.mp4
music.mp3
document.docx
list.txt
song.mp3
movie.MP4

Sample Output

 3 .txt
 2 .mp4
 2 .mp3
 1 .pdf
 1 .docx

Constraints

  • Filenames always contain an extension.
  • Extensions may be in any case; output must be lowercase.
  • Output must be in lowercase.

Question 2

+20 marksProgramming

Given n, find all twin-prime pairs whose sum is <= n. Print each pair as (p1, p2), sorted ascending by the first prime.

Instructions

  • Write your script in script.sh.
  • Read n from standard input.

Sample Input

24

Sample Output

(3, 5)
(5, 7)
(11, 13)

Constraints

  • n is a positive integer <= 10000.

Question 3

+20 marksProgramming

Given a string, check if its SHA-1 hash contains the string. If not, hash the hash and check again. Repeat up to 10 times. Print the iteration number and hash for each step. Stop when found; print Not Found after 10 iterations if never found.

If the input contains non-hex characters, immediately print Not Found (it can never appear in a SHA-1 hash).

Instructions

  • Write your script in script.sh.
  • Read one line from standard input.
  • Check is case-insensitive.

Sample Input 1

g

Sample Output 1

Not Found

Sample Input 2

12

Sample Output 2

1: ad552e6dc057d1d825bf49df79d6b98eba846ebe
2: ab16bf05b01c833603826780711e0012597f02d7

Constraints

  • Input contains only printable alphanumeric characters.

2 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the System Commands OPPE 1 Jan 2026 paper

The IIT Madras BS System Commands (System Commands) OPPE 1 paper sat on Jan 2026, in the January 2026 term: 5 questions for 100 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureSystem Commands OPPE 1 Jan 2026 at a glance
TermJanuary 2026 term
SubjectSystem Commands
Course codeBSSE2001
Questions5
Marks100
Duration180 min
Programming5
Official paperOPPE 1, Jan 2026
Negative markingNo negative marking.
Updated

Same OPPE 1, other subjects

More System Commands