[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shell que lista as portas ativas
From: |
Anderson Montenegro |
Subject: |
shell que lista as portas ativas |
Date: |
Wed, 14 Jun 2000 10:24:32 -0300 |
eu criei um pequeno shell que lista se a porta 80 esta ativa no meu linux
que e o seguinte:
netstat -an | grep LIST | grep 80 | cut -d: -f2 | awk ' { print $1 }´
so que eu queria fazer esse script ficar mais amigavel.
Entao criei o script abaixo so que ele nao esta funcionando
#!/bin/sh
PORTAS="/usr/sbin/netstat -an | grep LIST | grep 80 | cut -d: -f2 | awk '
{ print $1 }´
if [ $PORTAS=="80" ] then
echo " a porta 80 esta ativa "
else
echo " a porta 80 nao esta ativa"
fi
- shell que lista as portas ativas,
Anderson Montenegro <=