[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] localizar e substituir
From: |
Felipe Kellermann |
Subject: |
Re: [shell-script] localizar e substituir |
Date: |
Fri, 1 Aug 2003 15:52:21 -0300 (BRT) |
On Fri, 1 Aug 2003 10:54am -0300, Carlos Henrique Tibo Narciso wrote:
> essa linha
> Compress=On
> ...etc
>
> Meu problema é alterar os IP's de todo o arquivo.
> Eu tenho uma rotininha que manda o IP teclado para uma variável que se chama
> SERVER_IP.
Guarda sempre o arquivo base e faz as substituições:
$ f(){ (echo "define(SERVER_IP, \`$2')" & cat -- $1)|m4; }
$ cat arq.txt && f arq.txt 192.168.2.29
[WFClient]
version=1
[ApplicationServers]
SERVER_IP=
Microsoft Word=
[SERVER_IP]
WinStationDrive= ICA 3.0
TransportDrive=TCP/IP
DoNotUseDefaultCSL=On
LocHttpBrowserAddress=SERVER_IP
LocTCPBrowserAddress=SERVER_IP
Compress=On
[WFClient]
version=1
[ApplicationServers]
192.168.2.29=
Microsoft Word=
[192.168.2.29]
WinStationDrive= ICA 3.0
TransportDrive=TCP/IP
DoNotUseDefaultCSL=On
LocHttpBrowserAddress=192.168.2.29
LocTCPBrowserAddress=192.168.2.29
Compress=On
--
Felipe Kellermann