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

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

pegar parte especifica do resultado...


From: Marcelo
Subject: pegar parte especifica do resultado...
Date: Tue, 16 Jun 2009 10:44:45 -0300
User-agent: Thunderbird 2.0.0.21 (X11/20090302)

Olá,

Tenho o seguinte resultado de um arquivo texto:

more resultado.txt

Interesting ports on 192.168.0.195:
PORT    STATE SERVICE
445/tcp open  microsoft-ds
MAC Address: 00:15:F2:31:21:87 (Asustek Computer)

Interesting ports on 192.168.0.197:
PORT    STATE    SERVICE
445/tcp filtered microsoft-ds
MAC Address: 00:18:F3:18:10:4C (Asustek Computer)

Interesting ports on 192.168.0.202:
PORT    STATE SERVICE
445/tcp open  microsoft-ds
MAC Address: 00:1E:8C:CD:8A:E4 (Asustek Computer)

Preciso pegar somente ip e mac-address e gerar um resultado2.txt como
abaixo:

more resultado2.txt

192.168.0.195   00:15:F2:31:21:87
192.168.0.197   00:18:F3:18:10:4C
192.168.0.202   00:1E:8C:CD:8A:E4

Estou tentando com "fgrep" "paste", mas acredito que estou dando uma
volta muito grande
e deve haver um jeito muito mais inteligente e facil de obter este
resultado.

Desde ja Agradeco,
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]