shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] sed, substituicao com espacos


From: Flavio Torres
Subject: Re: [shell-script] sed, substituicao com espacos
Date: Wed, 18 Jun 2008 17:20:07 -0300
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Flavio Torres wrote:
|
|
| Bom, como a tag esta no fim da página, e ela possui 9 linhas mais as
| finais </body> e </html>, uma solução foi remove-las, assim:
|
|
| sed '/^.*www.google-analytics.com\/urchin.js.*/,+11 d' arquivo.html
|
| E depois, adicionar o novo bloco no final do arquivo, com o novo bloco
| de cat >> dando um append.


E em awk, ficaria algo assim:

awk '/^.*www.google-analytics.com\/urchin.js.*/{c=11};--c<0'


- --
/"\
\ /  Flavio Torres - flaviotorres.com.br
~ X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)

iEYEARECAAYFAkhZbfcACgkQNRQApncg294PTACgpiBifUTikJl4rBzHSP2p+8zl
yFAAn0Z3uBP0UmyD3oLIRPSh0GpcPysl
=VYJy
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]