Em 12/04/08, Mario Felipe Rinaldi <[EMAIL PROTECTED]> escreveu:
>
>
> On Fri, Apr 11, 2008 at 2:21 PM, Psycho Mantys <[EMAIL PROTECTED]>
> wrote:
> >
> >
> > 2008/4/11, Rodrigo Flores <[EMAIL PROTECTED]>:
> > >
> > >
> > > On Fri, Apr 11, 2008 at 11:05 AM, Vagner Aparecido da Silva
> > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > >  Bom dia pessoal, eu estou usando o comando tail -f em alguns
> arquivos
> > de
> > > > log e surgiu a necessidade de monitorar mais de uma sentença no log.
> > Hoje eu
> > > > uso o comando
> > > >
> > > >  # tail -f /var/log/squid/access.log | grep 192.168.1.10
> > > >
> > > >  para monitorar o ip 192.168.1.10. Eu preciso filtrar duas ou mais
> > entradas.
> > > > Por exemplo: # tail -f /var/log/squid/access.log | grep 192.168.1.10OU
> > > > 192.168.1.15.
> > > >
> > > >  Como eu poderia fazer isso?
> > >
> > >
> > > Uma sugestão usando RegEx:
> > >
> > > tail -f /var/log/squid/access.log | egrep 192.168.1.(10|15)
> > >
> > >
> > > >
> > > >  Abraços,
> > > >  --
> > > > Vagner Aparecido da Silva
> > > > ------------------------------------------
> > > > Usuário Linux #241911
> > > > Fone: (11) 8154-6125
> > > > MSN: [EMAIL PROTECTED]
> > > >
> > > >
> > > >  >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > ---------------------
> > >
> > > Rodrigo Flores
> > > Computer Science Student
> > > IME - USP
> > > Mobile : 55 11 9972 9030
> > > Jabber (Add me in your gtalk): [EMAIL PROTECTED]
> > > Linux User # : 351304
> > > Personal Page: www.farok.net
> > >
> > >
> > >
>
> > > Boa, bem lembrado :D. Escrever menos sempre e melhor xD
> > >
>
>
>
> então nao daria pra fazer assim:
>   tail -f /var/log/squid/access.log | egrep 192.168.1.1(0|5)
>
> ???????
>
>
>
> (economia de um caractere!!! :P )
> > >
> > >
> > > --
>
> > > Adote um pinguim, saiba como! Me mande um e-mail demonstrando
> interesse!
> > >
> > > http://www.slackware.com
> > > http://img365.imageshack.us/img365/8483/snapshot3ak6.png
> > > U.L. : 450347
> > > Fnord
> > > > >
> > >
> >
>
>
>
>
> --
> []s
>
> Mário Rinaldi
> http://mozillabrasil.org - Comunidade MozBR
> http://rinaldi-rinaldi.info - Blog Pessoal
>
>
> /*
>
> Mammon slept. And the beast reborn spread over the earth and its
> numbers grew legion. And they proclaimed the times and sacrificed
> crops unto the fire, with the cunning of foxes. And they built a new
> world in their own image as promised by the sacred words, and spoke of
> the beast with their children. Mammon awoke, and lo! it was naught but
> a follower.
>
> from The Book of Mozilla, 11:9
> (10th Edition)
>
> */
>
>
> >
>
######################################################################################

Daria sim. So tem que ter cuidado para o shell nao interpretar o parênteses
errado. Deveria fazer assim:
tail -f /var/log/squid/access.log | egrep 192.168.1.1'(0|5)'

Boa sorte!!

-- 
Adote um pinguim, saiba como! Me mande um e-mail demonstrando interesse!

http://www.slackware.com
http://img365.imageshack.us/img365/8483/snapshot3ak6.png
U.L. : 450347
Fnord

--~--~---------~--~----~------------~-------~--~----~
GUS-BR - Grupo de Usuários de Slackware Brasil
http://www.slackwarebrasil.org/
http://groups.google.com/group/slack-users-br
-~----------~----~----~----~------~----~------~--~---

Responder a