Thread: bash script to print a list of established connections
i looked on net , couldn't find suitable. perfect if have conky , want see list of established internet connections without fluff in between:
the output this:code:#!/bin/bash ############################################################################## # simple bash script show established connections x="0" in `netstat -n | grep "established"`; x=$((x + 1)) if [ $x == 5 ]; if [[ $i != *'127.0'* ]] && [[ $i != *'192.168'* ]]; echo "$i" fi elif [ $x == 6 ]; x="0" fi done
enjoycode:72.127.xxx.xxx 42.78.xxx.xxx 98.54.xxx.xxx ...etc, etc![]()
hello, know last post posted time ago, wondering how script have like, if want add "lsof -i :port" process information behind established ports , ip addresses?
can me out here?
example:
x.x.x.x:port/command:user:node:name (maybe, command+name)
thanks,
snitride
Forum The Ubuntu Forum Community Other Discussion and Support Tutorials bash script to print a list of established connections
Ubuntu
Comments
Post a Comment