[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Please help with adding spaces between '#include' and '<...>'.
From: |
Oleksandr Gavenko |
Subject: |
Re: Please help with adding spaces between '#include' and '<...>'. |
Date: |
Tue, 03 Jul 2012 20:58:38 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
On 2012-07-03, David Thompson wrote:
> From: Oleksandr Gavenko <address@hidden>
>
>> I get sources with lines like:
>>
>> #include<stdio.h>
>> #include"locals.h"
>
> [snip]
>
>> Currently I run 'sed'...
>
> [a bit off-topic, but ...]
>
> If your sed solution requires a temporary file,
> try using this perl command line,
>
> perl -p -i -e 's/^#include</#include </' files...
>
> which does not require a temporary file; perl does
> the search & replace all in one command.
>
> I call this the "perl pie" solution.
>
Thanks in interest for my question!
Currently I did same solution with GNU sed. It also have "magic" -i option.
It come with Cygwin and most Linux distros.
--
Best regards!