1.

Which shortcut does sed offer to replace the string Linux with Red hat Linux?(a) { }(b) ( )(c) ^^(d) &The question was posed to me in a job interview.My question is based upon sed command topic in portion Filters using Regular Expressions of Unix

Answer»

The correct answer is (d) &

Easy explanation: sed SUPPORTS the use of REPEATED PATTERN. For this purpose, & is used. It makes the whole string appear in the target string also. For example, to replace the string Linux with Red HAT Linux, use the following COMMAND:



Discussion

No Comment Found

Related InterviewSolutions