uiz Space

May 2022 term · System Commands · BSSE2001

System Commands Quiz 2: 10 July 2022 (May 2022 term)

The IIT Madras BS System Commands (System Commands) Quiz 2 paper sat on 10 Jul 2022, in the May 2022 term: 18 questions for 100 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
18
Marks
100
Duration
120 min
Numerical
1
MCQ
10
MSQ
7

Updated

Official paper: IIT M DIPLOMA QUIZ2 EXAM QPE1 10 July 2022 · No negative marking.

Question 1

+6 marksNumerical answer

What is the output of the following bash script?

Show answer

Correct answer: 4321

Question 2

+4 marksOne correct option

What is the expected output of the following command.

  1. A

    Gives the total number of directories in the current working directory.

  2. B

    Gives the total number of directories with space in their name in the current working directory.

  3. C

    Gives the total number of files with space in their name in the current working directory.

  4. D

    Gives the total number of directories with a dot in their name in the current working directory.

Show answer

Correct answer

  • B

    Gives the total number of directories with space in their name in the current working directory.

Question 3

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 4

+5 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 5

+5 marksOne correct option
  1. A

    0

  2. B

    53

  3. C

    45

  4. D

    1

  5. E

    45.53

Show answer

Correct answer

  • C

    45

Question 6

+5 marksOne correct option
  1. A

    Prints the line having only three digits.

  2. B

    Prints the line having at least three digits.

  3. C

    Prints the line having three consecutive digits.

  4. D

    Prints the line having at most two consecutive digits.

Show answer

Correct answer

  • C

    Prints the line having three consecutive digits.

Question 7

+5 marksOne correct option
  1. A
  2. B
  3. C
  4. D
  5. E
Show answer

Correct answer

  • D

Question 8

+6 marksOne correct option

What will the below command print?

  1. A

    Second occurrences of duplicate lines.

  2. B

    Distinct lines in the alphabetically sorted order.

  3. C

    Distinct lines in the order of first occurrence.

  4. D

    The lines that are present more than once.

Show answer

Correct answer

  • C

    Distinct lines in the order of first occurrence.

Question 9

+6 marksOne correct option

Here is a part of information from AWK manual,

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 10

+7 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answers

  • A
  • C

Question 11

+6 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answers

  • A
  • C
  • E
  • F

Question 12

+6 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
Show answer

Correct answers

  • A
  • B

Question 13

+6 marksOne or more correct options

The following bash script performs some operation. This script is run with some command line arguments. The command line argument values contains only alphanumeric characters.

Which of the following bash scripts is an will give the same output as the above script?

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • B
  • C
  • D

Question 14

+6 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answers

  • B
  • C

Question 15

+4 marksOne or more correct options

Consider the AWK script and answer the given subquestions

Select all the correct statement(s) with respect to the given AWK script.

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answers

  • A
  • C
  • D
  • E

Question 16

+5 marksOne correct option

Consider the AWK script and answer the given subquestions

Select the output of the AWK script on the input given below.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 17

+8 marksOne or more correct options

Based on the above data, answer the given subquestions

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answers

  • D
  • F

Question 18

+6 marksOne correct option

Based on the above data, answer the given subquestions

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answer

  • C