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

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

Pegar range especifico de ip


From: Marcelo
Subject: Pegar range especifico de ip
Date: Thu, 05 Mar 2009 09:28:55 -0300
User-agent: Thunderbird 2.0.0.19 (X11/20081209)

Srs,

Usando fgrep/grep/egrep como consigo "pegar" um range especifico de ip?
por exemplo, tenho um arquivo com o conteudo:

192.168.0.20
192.168.0.200
192.168.0.233
192.168.0.250
192.168.0.252
192.168.200.22
192.168.200.211
1922.168.200.212
192.1688.200.213


Preciso pegar o range de 192.168.xxx.210 ate 192.168.xxx.250

Estou usando o txt2regex mas o mais proximo que cheguei foi:

 egrep ^[0-9]{3}\.[0-9]{3}\.[0-9]+\.[0-9]{3} arquivo

resultado:

192.168.0.200
192.168.0.233
192.168.0.250
192.168.0.252
192.168.200.211

Preciso somente de:

192.168.0.233
192.168.0.250
192.168.200.211

É isso...


Abraços e Obrigado,

Marcelo

---------------------------------------------------------------------
Esta mensagem pode conter informacao confidencial.
Se voce nao for o destinatario ou a pessoa autorizada a receber
esta mensagem, nao podera usar, copiar ou divulgar as informacoes nela
contidas ou tomar qualquer acao baseada nessas informacoes. Se
voce recebeu esta mensagem por engano, favor avisar imediatamente o
remetente, respondendo o e-mail e, em seguida, apague-o.
Agradecemos sua cooperacao.

This message may contain confidential information.
If you are not the addressee or authorized person to receive it for the
addressee, you must not use, copy, disclose or take any action based on
this message or any information herein. If you have received this message
in error, please advise the sender immediately by replying this e-mail 
message and delete it.
Thanks in advance for your cooperation.
----------------------------------------------------------------------
                  Faculdade de Medicina USP
----------------------------------------------------------------------



reply via email to

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