PDA

View Full Version : vi editor global command



yc2
July 4th, 2010, 07:51 PM
I am reading this tutorial on vi by Walter Alan Zintz
http://www.networkcomputing.com/unixworld/tutorial/009/009.part3.html#section1

It says that this command may overflow your disk


WARNING THIS COMMAND MAY OVERFLOW YOUR DISK!
global /^Chapter [1-9]/ write >> t.of.contents
WARNING THIS COMMAND MAY OVERFLOW YOUR DISK!
I cannot understand why?

yc2
July 4th, 2010, 08:08 PM
Starting this thread maybe finally made me think clearly about the problem. I guess a dot is missing? (otherwise w will write the entire file, I never dared try it)


global /^Chapter [1-9]/ . write >> t.of.contents