1.

Which of the following command will be used to write the 4th line to file named file002?(a) : 1,40w file002(b) : 1,$w file002(c) : 4w file002(d) : 1,4w file002This question was posed to me by my college director while I was bunking the class.My question comes from Vi-Ex Mode topic in portion The Vi Editor of Unix

Answer»

The correct answer is (C) : 4w file002

The best I can explain: To write selected line(s) to another file, we can USE ex-mode COMMAND ‘:w’ along with the line number and FILENAME.



Discussion

No Comment Found

Related InterviewSolutions