2 added 20 characters in body
source | link

You can use Vim in Ex mode:

ex -sc '1,5d|x''1d5|x' file
  1. 1, move to first line

  2. 5 select first 5 lines

  3. d delete

  4. x save and close

You can use Vim in Ex mode:

ex -sc '1,5d|x' file
  1. 1,5 select first 5 lines

  2. d delete

  3. x save and close

You can use Vim in Ex mode:

ex -sc '1d5|x' file
  1. 1 move to first line

  2. 5 select 5 lines

  3. d delete

  4. x save and close

1
source | link

You can use Vim in Ex mode:

ex -sc '1,5d|x' file
  1. 1,5 select first 5 lines

  2. d delete

  3. x save and close