1.

Which of the following is a correct syntax for performing substitution on a file?(a) :address/source_pattern/target_pattern/flag(b) :address/target_pattern source_pattern/flag(c) :address/flag(d) :addressI have been asked this question in an interview for job.My doubt is from Commands for Searching, Replacing and Substituting in Vi Editor topic in division The Vi Editor of Unix

Answer»

Correct ANSWER is (a) :address/source_pattern/target_pattern/flag

Explanation: For performing substitution, the correct syntax is:

:address/source_pattern/target_pattern/flag

For example, if we want to PERFORM substitution on line number 1 to 50, SOURCE pattern is ‘directory’ and TARGET pattern is ‘member’ then,



Discussion

No Comment Found

Related InterviewSolutions