Quiz Space

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

Question 1

+20 marksProgramming

You are working on an Angular project and you need to scaffold a base skeleton.

Write a script scaffold.sh that creates the following filesystem structure. It should take one command line argument, which can be local or prod. Accordingly, it should choose which environment the symlink points to.

If $1 is given as prod, your script should scaffold this:

src/
├── app/
│   └── index.html
└── environments/
    ├── environment.local.ts
    ├── environment.prod.ts
    └── environment.ts -> environment.prod.ts

If $1 is given as local, your script should scaffold this instead:

src/
├── app/
│   └── index.html
└── environments/
    ├── environment.local.ts
    ├── environment.prod.ts
    └── environment.ts -> environment.local.ts

Instructions

  • Write your script in scaffold.sh. It will be given the command line argument prod or local and should use it to create the symlink.
  • It should create the files and folders in the current directory.
  • Files can be empty files.
  • If the link is not correctly created, the test fails and no marks are given.

Hints

  • Symlinks store the path relative to the link itself.

The test lists what your script created, with -> after each symlink.

Question 2

+20 marksProgramming

Given two positive integers, interleave their digits to form and print a new number.

The digits of the two input numbers should be taken from left to right, one digit at a time. Start with the first digit of the first number, then take the first digit of the second number, followed by the second digit of the first number, then the second digit of the second number, and so on. If one number has fewer digits than the other, continue adding the remaining digits of the longer number in their original order after all digits of the shorter number have been used.

Instructions

  • Write your script in script.sh.
  • Read the numbers from standard input, one per line.
  • Print the new number to standard output.

Sample Input

1234
5678

Sample Output

15263748

Sample Input

11111111
222

Sample Output

12121211111

Constraints

  • The numbers will always be positive and entered without a leading sign.
  • The numbers will not have any fractional values.
  • The two numbers may be of different lengths.
  • If the two numbers have different lengths, continue the rest of the longer number in the output.

Question 3

+20 marksProgramming

Given a number, find its sum of digits.

Instructions

  • Write your script in script.sh.
  • The script should read the number from standard input.
  • The script should output the sum to standard output.

Sample Input 1

101

Sample Output 1

2

Sample Input 2

222

Sample Output 2

6

Constraints

  • The number can be any number of digits.
  • The number will be positive and have no leading sign.
  • The number will be whole and contain no decimal points.

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 May 2026 paper

The IIT Madras BS System Commands (System Commands) OPPE 1 paper sat on May 2026, in the May 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 May 2026 at a glance
TermMay 2026 term
SubjectSystem Commands
Course codeBSSE2001
Questions5
Marks100
Duration180 min
Programming5
Official paperOPPE 1, May 2026
Negative markingNo negative marking.
Updated

Same OPPE 1, other subjects

More System Commands