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

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

Tabular relatório


From: rensousa
Subject: Tabular relatório
Date: Tue, 26 Oct 2004 17:30:36 -0300
User-agent: Internet Messaging Program (IMP) 3.1

Olá amigos Shelleiros,
Estou desenvolvendo um shell script que analisa os logs do firewall e identifica
as máquinas do meu dominio que estão executando um portscan na porta 135 ou 445
do meu servidor de email.  O script ta funfando q é uma beleza, só estou tendo
dificuldades para alinhar os dados na tela.  Estou imprimindo cada linha da
seguinte forma: echo -e "$dia/$mes \t$origem\t$host\t\t $proto $porta"
O problema é q algumas linhas estão ficando desalinhadas pelo tamanho do nome do
host.  Tem alguma solução ???

Exemplo do relatório
Data    IP Origem       Host                             Prot Porta
25/Oct  200.xxx.xxx.xxx xxxx.xxxx.xxxxx.xx               TCP 135
25/Oct  200.xxx.xxx.xxx xxxxxxxx-xxx.xx.xxxxx.xx                 TCP 135
25/Oct  200.xxx.xxx.xxx xxxxxxxx.xxxxxx.xx.xxxxx.xx              TCP 135
25/Oct  200.xxx.xxx.xxx xxxxx-xx-xxxxx.xx.xxxxx.xx               TCP 135
25/Oct  200.xxx.xxx.xxx xxxxx-xx-xxxxx.xx.xxxxx.xx               TCP 135
25/Oct  200.xxx.xxx.xxx xxxxxx-xxxx.xx.xxxxx.xx          TCP 135
25/Oct  200.xxx.xxx.xxx xxxxxx-xxxx.xx.xxxxx.xx          TCP 135
25/Oct  200.xxx.xxx.xxx xxxxxxxxx-xxxx.xx.xxxxx.xx               TCP 135
25/Oct  200.xxx.xxx.xxx xxxx-xx.xxxxx.xx.xxxxx.xx                TCP 135
25/Oct  200.xxx.xxx.xx  xxxxxxx.xxxxx.xxxxx.xx           TCP 135
26/Oct  200.xxx.xxx.xxx xxxxx.xx.xx.xxxxx.xx             TCP 135

Outra coisa, gostaria tbem de bolar alguma coisa legal pra substituir esse
25/Oct por 25/10, será que o comando date tem alguma coisa assim ?

Obrigado

Renato L.Sousa 


reply via email to

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