Monitor services shell script

The script to monitor services here is really great but does not listen on tcp6 port
https://bash.cyberciti.biz/monitoring/monitor-unix-linux-network-services/

line approx 80 need to be changed as follow with -A inet6 and double rev pipe plus field f1

RPORTS=$($NETSTAT -tulpn -A inet -A inet6 | grep -vE '^Active|Proto' | grep 'LISTEN' | awk '{ print $4}' | rev | cut -d: -f1 | rev | sed '/^$/d' | sort  -u
1 Like

Fixed. Thanks for the feedback.