Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
System Commands
awk, sort & text filters
Official Paper
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
End Term · 31 Aug 2025 (FN)End Term
- Q1MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
End Term · 31 Aug 2025 (AN)End Term
- Q2MCQ5 Marks·Choose one option
You're using gawk to identify repeated words in notes.txt. Which gawk statements correctly use backreferences?
- A

- B

- C

- D

- A
- Q3MCQ5 Marks·Choose one option

- A192.168.0.1 3
- B192.168.0.2 2
- C192.168.0.3 1
- DBoth 192.168.0.1 3 and 192.168.0.2 2
- Q4MCQ5 Marks·Choose one option

- AFirst line of each paragraph
- BAll blank lines
- CEntire file in one line
- DFirst field of each line
- Q5MSQ5 Marks·Choose all correct options

- Ased -n '1,10p' file.txt
- Bsed 11q file.txt
- Cawk 'NR <= 10' file.txt
- Dcat -n 10 file.txt
- Q6NAT5 Marks·Write the number
Your answer:
End Term · 13 Apr 2025 (FN)End Term
- Q7MCQ7 Marks·Choose one option

- A

- B

- C

- D

- A
- Q8MCQ7 Marks·Choose one option
What is the primary purpose of this AWK script?- ATo convert contents of file to lowercase.
- BTo count the frequency of each word in a text file.
- CTo count the number of lines in a file.
- DTo replace all non-alphabetic characters in a file.
End Term · 22 Dec 2024 (FN)End Term
- Q9MCQ3 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q10MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q11MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q12MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
End Term · 22 Dec 2024 (AN)End Term
- Q13MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q14MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q15MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A