Tuesday, April 24, 2012

Re: How I can run vim commands from a bash script?

Hi,

Marc Weber wrote:
> Excerpts from Jürgen Krämer's message of Tue Apr 24 14:02:29 +0200 2012:
>> vim -c "set autowrite nomore" -c "argdo %s/.../.../" -c "q" *.txt
> I haven't thought about it for long because the simple sed command does
> the job. So no, there was no specific reason because it doesn't make
> sense to me anyway because sed is shorter.

yes, but only if you have a GNU sed, because AFAIK -i is a GNU extension.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

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

Post a Comment