sed

gwallner Georg.Wallner at ead-systeme.de
Tue Sep 20 14:44:11 UTC 2011


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




More information about the ubuntu-users mailing list