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

The tutorials here on LibreByte are provided under a free software licence. if you like my work you should consider:
Buy a Hosting/VPS or Dedicated Server at MCKHost

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.