Explore topic-wise MCQs in Unix.

This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.

1.

What will be the function of the following command?
$ sed s/ *|/|/g emp.lst

A. replace * with |
B. replace / with |
C. compress multiple spaces
D. erroneous output
Answer» D. erroneous output
2.

To replace the string director in the first five lines of file emp.lst with manager we can use _____

A. sed s/director/manager/ emp.lst
B. sed 1-5s/director/manager/ emp.lst
C. sed 1,5s/director/manager/ emp.lst
D. sed 15s
Answer» D. sed 15s