1.

Which command will be used for selecting lines 3 to 10 from emp.lst?(a) sed 3,10emp.lst(b) sed -n ‘3,10p’ emp.lst(c) sed -n ‘^,10p’ emp.lst(d) sed -n, 10pThis question was posed to me in an online quiz.My question is based upon sed command in division Filters using Regular Expressions of Unix

Answer»

The CORRECT answer is (b) sed -n ‘3,10p’ emp.lst

To EXPLAIN I would say: To select a specific number of LINES, we can USE sed along with p OPTION. For example,



Discussion

No Comment Found

Related InterviewSolutions