My Report

Unix Mock Test 7


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

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

Question 1 of 10

Question 2 of 10

2. Which option is used with sed for using multiple instructions?

Question 2 of 10

Question 3 of 10

3. Which of the following is not a subset of BRE (basic regular expression) character subset?

Question 3 of 10

Question 4 of 10

4. Which one of the following is the correct syntax for grep command?

Question 4 of 10

Question 5 of 10

5. The syntax for using && is ______________

Question 5 of 10

Question 6 of 10

6. We can use comparison operators without a ‘-‘.

Question 6 of 10

Question 7 of 10

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

Question 7 of 10

Question 8 of 10

8. Which option is used for sorting a file according to primary key?

Question 8 of 10

Question 9 of 10

9. It is essential to use whitespaces when we use [].

Question 9 of 10

Question 10 of 10

10. Which one of the following command will be used for adding two spaces before every line in emp.lst?

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.