Copy a range of lines from a file to another

VIM

To copy a range of lines from a file to another:

1. Open the file in VIM

$ vim fich 

2. Execute the following command within the editor (press Esc while in insert mode)

:num-sup-line,num-inf-linew! file-name

Example:

:10,50w! file-name

Further reading

– help write




Leave a Comment

Your email address will not be published. Required fields are marked *