Thursday, June 7, 2012

Re: What is the largest file I can edit using vim?

On 2012-06-07, Dominique Pellé wrote:
> Marc Weber 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

Are you sure that tac works in this case? I thought that tac pushed
all the input lines onto a stack in memory, then popped each line as
it was output. That means having to put the entire file into
memory, which we were trying to avoid.

Regards,
Gary

--
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

No comments: