Tuesday, April 24, 2012

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

On Tue, 2012-04-24 at 04:42 -0700, Antonio Recio wrote:
> I am trying to write an script to execute a vim command to multiples txt files and to overwrite these txt with the result. Something like that.
>
> #!/bin/sh
> for i in *.txt; do vim ":%s/foo/bar/g"; done
>
> How I can run vim commands from a bash script? What I am doing bad?
>

One obvious thing I can see is the missing filename in the vim
command :)

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