copy/paste lines between files via vi
Tuesday, May 4, 2010 6:13:03 PM
1) Find out the line number you want to copy.
: set number
2) Attach the specific lines to the bottom of the other file. For example, mfrom line 42 to 52
: 42,52w >> newfile
REFERENCES:
http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/
http://www.computing.net/answers/unix/copy-lines-in-vi-from-other-file/8359.html
: set number
2) Attach the specific lines to the bottom of the other file. For example, mfrom line 42 to 52
: 42,52w >> newfile
REFERENCES:
http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/
http://www.computing.net/answers/unix/copy-lines-in-vi-from-other-file/8359.html






