brauche hilfe bei nem shellscript

Volker Gueth Volker at Gueth.net
Mon May 31 09:29:42 CEST 2004


On Mon, May 31, 2004 at 03:41:14AM +0200, Martin Herweg wrote:
> 
> hi Lug!
> 
> folgende aufgabe:
> 
> [Default]
> SERVER = 192.168.0.1
> 
> pseudocode:
> lösch alles hinter dem "SERVER = " und ersetze es durch
> $NEUE-IP

sed -e '/[Default]/,/SERVER.*/s/SERVER.*/SERVER = 192.168.0.1/' text

Wenn sonst keine Zeile mit SERVER beginnt wird es noch einfacher.

Bye Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20040531/681818e1/attachment.sig>


More information about the Linux mailing list