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
This question was addressed to me in an internship interview.
I need to ask this question from sed command in portion Filters using Regular Expressions of Unix