1.

To suppress the behavior of ‘p’ command of sed, we use ____ option.(a) -q(b) -n(c) -i(d) -vThe question was posed to me by my college professor while I was bunking the class.Origin of the question is sed command topic in division Filters using Regular Expressions of Unix

Answer»

The CORRECT CHOICE is (b) -n

For explanation: When we use ‘p’, it BEHAVES in a strange manner i.e. it both displays and prints the SELECTED lines.So the selected lines will appear TWICE. To suppress this behavior, we use the -n option whenever we use the p command. For example,



Discussion

No Comment Found

Related InterviewSolutions