[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] grep -v ou alternativa ?
From: |
Thobias Salazar Trevisan |
Subject: |
Re: [shell-script] grep -v ou alternativa ? |
Date: |
Tue, 8 Apr 2003 12:12:49 -0300 (EST) |
On Tue, 8 Apr 2003, David Mello wrote:
> mas acontecec o seguinte,
> quando eu uso $1 por exemplo
> cat x | sed '/<Virtual/{:a;/<\/Virtual/!{N;ba;};/$1/d;}'
> dai ja nao funciona :-(
sim, vc tem que colocar aspas dupas pro shell expandir a variavel:
#!/bin/bash
cat x | sed \
"/<Virtual/{:a;/<\/Virtual/!{N;ba;};/$1/d;}"
> onde posso achar um bom manual de sed ?
em ingles eh soh procurar no google que tem varios. Tem o FAQ
http://www.student.northpark.edu/pemente/sed/sedfaq.html
em pt_BR tem o sed-howto do aurelio que eh muuiitoo bom!!
http://www.verde666.org/sed/
falow
thobias
-------
echo 24883721290304465999833114447114149701898P | dc
-------
http://www.lcp.coppe.ufrj.br/~thobias
____________________________
|
| Against - HTML Mail
| Against - MS ATTACHMENTS
|
----------------------------