Re: Modifying many lines in many files
- Hi Jeri!
On Fr, 24 Dez 2010, Jeri Raye wrote:
> I need to modify a many files, all in the same way.
> The modification is to
> - add one space-character at the beginning of every line.
> - delete the space-character at the end of every line.
> In other words:
> If the line looks like this:
> [start of line]12345 [end of line]
> It needs to become:
> [start of line] 12345[end of line]
> How to do that?
This sound like you want sed. For your use case, you probably want
sed -i 's/\(.*\) $/ \1/' files
> And I want to place this in a batch file (working on windows xp)?
Oh. On Windows, quoting might be the problem. I don't know much about
it. But with cygwin, it's straight forward.
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