[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Substituir valor em arquivos
From: |
Junior Barreto |
Subject: |
Re: [shell-script] Substituir valor em arquivos |
Date: |
Mon, 5 Apr 2004 16:13:29 -0300 (ART) |
Véio.. vc pode dar um cat no arquivo e depois usar o
SED para fazer a substituição !
Veja soh..
cat /home/user/arquivo_01 | sed
's/PALAVRA_ANTIGA/PALAVRA_NOVA/g'
Eu num testei aqui !!
Mas veja aê e qualquer coisa vc fala..
--- Ricardo Rodrigues <address@hidden>
escreveu: > Pessoal,
>
> Tenho que substituir uma valor em diversos
> arquivos e gostaria de um scritp que
> fizesse isto autaticamente: Segue abaixo exemplo:
>
> Verificar se existe nestes arquivos a palavra
> PALAVRA_ANTIGA, caso sim,
> substitua para PALAVRA_NOVA.
>
> /home/user/arquivo_01
> /home/user/arquivo_02
> /home/user/arquivo_03
>
> /usr/var/arqivo_empresa_01
> /usr/var/arqivo_empresa_05
> /usr/var/arqivo_empresa_10
>
>
> Desde já obrigado.
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> | _ |
> | ºVº Ricardo Rodrigues |
> | /(_)\ Linux User # 347648 |
> | ^ ^ address@hidden |
> | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
>
______________________________________________________________________
Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora:
http://br.yahoo.com/info/mail.html
- Resumos inferiores a 1006 ..., Marcelo Giovanni Dias, 2004/04/04
- awk, darksystem, 2004/04/05
- RES: [shell-script] awk, Rodolfo Villanova - TmS Brasil, 2004/04/05
- Re: [shell-script] awk, darksystem, 2004/04/05
- Re: [shell-script] awk, Miranda, 2004/04/05
- Separar caracteres, Junior Barreto, 2004/04/05
- Substituir valor em arquivos, Ricardo Rodrigues, 2004/04/05
- Re: [shell-script] Substituir valor em arquivos, ralobao, 2004/04/05
- Re: [shell-script] Substituir valor em arquivos,
Junior Barreto <=
- RES: [shell-script] awk, Rodolfo Villanova - TmS Brasil, 2004/04/05
- Script auditoria, laerte, 2004/04/06
- Re: [shell-script] Script auditoria, Felipe Kellermann, 2004/04/06
- Re: [shell-script] Script auditoria, SuSE List, 2004/04/06
- Re: [shell-script] Script auditoria, ralobao, 2004/04/06
- client de mail para gravar um anexo automaticamente, groo, 2004/04/06
- Re: [shell-script] client de mail para gravar um anexo automaticamente, Aurelio Marinho Jargas, 2004/04/06
- Re: [shell-script] Script auditoria, ralobao, 2004/04/06