find port greater than 6000

How to get the listening ports which is greater than 6000 using netstat ?

I'm sure there are easier ways to do this but the following command work in a AIX 5.3

for port in $(netstat -na | grep LISTEN | awk '{print $4}' | awk -F. '{print $NF}' | sort -n); do if [ $port -gt 6000 ]; then echo $port; fi; done

In AIX unix, nestat -na | grep Listen command shows listen ports like *.7006. In other *nixes (or linux for instance) output may be like 127.0.0.1:7006 so dont forget to adapt the awk part awk '{print $4}' | awk -F. '{print $NF}'

Cheers