Marc Weber <marco-oweber@gmx.de> wrote:
> forgett about vim, on linux just do:
> tail -n +10 file.sql | head -n +10 > trimmed.sql
Many people posted solutions with head and tail that don't work.
Here is one that works:
$ sed 1,10d < input.txt | tac | sed 1,10d | tac > output.txt
Here is another one, faster but uglier:
$ perl -ne 'print $l[$.%10] if ($. >= 10*2); $l[$.%10] = $_' input.txt
> output.txt
-- Dominique
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Thursday, June 7, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment