| Chess | Tools | Data | Blog | Poetry | Why? | Wiki | Admin | Logout |

Download


#!/bin/sh
# $Revision: 1.2 $
# Luis Mondesi < lemsx1@gmail.com >
#
# DESCRIPTION: Prints tcp and udp connections that are listening
# similar to "netstat -l"
# USAGE: lsports [port]
# LICENSE: GPL
if [ ! -z $1 ]; then
    netstat -na | egrep -i "(tcp|udp)" | egrep -i $1
else
    netstat -na | egrep -i "(tcp|udp)"
fi

Advertisement