removido
(usa Nenhuma)
Enviado em 27/11/2013 - 16:31h
PERFEITO ESSE SEU EXEMPLO
phoemur ~/bash/teste $ cat arquivo.txt
14:32:36.476554 -192.168.11.20.49357= +72.21.91.203.443:*
14:32:36.477140 -192.168.11.20.49447= +199.16.156.70.443:*
14:32:36.495381 -192.168.11.20.49449= +199.16.156.70.443:*
14:32:36.577317 -192.168.11.20.49448= +199.16.156.70.443:*
14:32:36.612582 -192.168.11.20.49455= +93.184.216.139.443:*
14:32:36.614670 -192.168.11.20.49455= +93.184.216.139.443:*
14:32:36.656537 -192.168.11.20.49452= +23.206.139.120.443:*
phoemur ~/bash/teste $ sed 's/^\(.*\)\..*-\(.*\)=.*+\(.*\):.*$/\1 \2 \3/g' arquivo.txt
14:32:36 192.168.11.20.49357 72.21.91.203.443
14:32:36 192.168.11.20.49447 199.16.156.70.443
14:32:36 192.168.11.20.49449 199.16.156.70.443
14:32:36 192.168.11.20.49448 199.16.156.70.443
14:32:36 192.168.11.20.49455 93.184.216.139.443
14:32:36 192.168.11.20.49455 93.184.216.139.443
14:32:36 192.168.11.20.49452 23.206.139.120.443
Mas eu preciso dessas informações sem as portas, nesse caso assim:
14:32:36 192.168.11.20 72.21.91.203
14:32:36 192.168.11.20 199.16.156.70
14:32:36 192.168.11.20 199.16.156.70
14:32:36 192.168.11.20 199.16.156.70
14:32:36 192.168.11.20 93.184.216.139
14:32:36 192.168.11.20 93.184.216.139
14:32:36 192.168.11.20 23.206.139.120
O que eu tenho e estou tentando é com o grep ,as nao consigo mostrar a hora, somente os ips de origem e destino
o comando é: grep -P -o '([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'