Quiz Space

System Commands OPPE 2: January 2023, Set 2 (January 2023 term)

Question 1

+15 marksProgramming

Write a SED script to print the domain names of email from the standard input.

Note: Domain name in an email address is anything which comes after @. e.g. in [email protected] the @somemail.com is the domain name.

Sample input

Mehta,1-322-248-9102,[email protected],Daman and Diu
Malik,1-335-746-5592,[email protected],Andhra Pradesh
Suri,1-134-516-1754,[email protected],Lakshadweep
Persaud,268-1152,[email protected],Dadra and Nagar Haveli
Joshi,1-869-326-6582,[email protected],OR
Subram,1-172-433-4318,[email protected],MH
Sehgal,647-1701,[email protected],DD

Sample output

yahoo.net
hotmail.com
protonmail.org
aol.co.uk
hotmail.com
hotmail.edu
outlook.co.uk

Question 2

+15 marksProgramming

Write a SED script which will print line with all the lines have the hotmail domain except the domain hotmail.com

Note: Domain name in an email address is anything which comes after '@'. e.g. in [email protected] the @somemail.com is the domain name.

Sample input

name,phone,email,region
Sahni,151-8534,[email protected],KA
Mehta,1-322-248-9102,[email protected],Daman and Diu
Malik,1-335-746-5592,[email protected],Andhra Pradesh
Suri,1-134-516-1754,[email protected],Lakshadweep
Persaud,268-1152,[email protected],Dadra and Nagar Haveli
Joshi,1-869-326-6582,[email protected],OR
Subram,1-172-433-4318,[email protected],MH

Sample output

Sahni,151-8534,[email protected],KA
Subram,1-172-433-4318,[email protected],MH

Question 3

+15 marksProgramming

Write a SED script to mask the first 6 digits of the phone numbers with asterisks, such that only last four digits of phone number of ten digits are visible. The phone number could be present anywhere in the text but it will be in the format of continuous ten digits starting with either of 9, 8, 7 and 6.

Sample Input

Yesterday I received a message from 9876543210, it has numerical sequence 1234567890 in it. then soon after I received the same message from 9876543211 as well. Then I called 9876543212 to inquire about it, they gave a reference id AHDISJ12354 and a fallback code 3245112341 as well.

Sample Output

Yesterday I received a message from ******3210, it has numerical sequence 1234567890 in it. then soon after I received the same message from ******3211 as well. Then I called ******3212 to inquire about it, they gave a reference id AHDISJ12354 and a fallback code 3245112341 as well.

5 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 2 Jan 2023 Set 2 paper

The IIT Madras BS System Commands (System Commands) OPPE 2 paper sat on Jan 2023, in the January 2023 term (T1 2023), set 2: 8 questions for 120 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 2 Jan 2023 Set 2 at a glance
TermJanuary 2023 term (T1 2023)
SubjectSystem Commands
Course codeBSSE2001
Questions8
Marks120
Duration180 min
Programming8
Official paperOPPE 2, Jan 2023 Set 2
Negative markingNo negative marking.
Updated

Other sets that day

More System Commands