sed
Johnny Rosenberg
gurus.knugum at gmail.com
Tue Sep 20 18:16:32 UTC 2011
2011/9/20 gwallner <Georg.Wallner at ead-systeme.de>:
> Hallo,
>
> try to search and replace following strings by a shell script with sed -i
> // forwarders {
> // 0.0.0.0;
> // };
>
> by
> forwarders {
> 192.168.0.1;
> };
>
> but i have problems whit new line and blanks.
> I used following replacement:
>
> sed -i 's@//forwarders {\
> // 0.0.0.0;\
> //};@forwarders {\
> 192.168.0.1;\
> };@' /etc/bind/named.conf.options
>
> Tanks
> Georg
Sed reads line by line by default, so I think you need to add
--unbuffered (or -u) for things like this.
Kind regards
Johnny Rosenberg
ジョニー・ローゼンバーグ
More information about the ubuntu-users
mailing list