Need simple 3 lines bash script

I need a simple bash script that will refresh automatically on my shell say after 2 minutes. Here is what I need

The following command prints total connections made by an ip address

netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1

104 [url removed, login to view]

33 [url removed, login to view]

What I need is to add hostname in the above list, so the output will look like:

104 [url removed, login to view] [url removed, login to view] (I need host name)

33 [url removed, login to view] [url removed, login to view]

Simple job for a quick review!

Evner: Linux, Mac OS, UNIX

Se mere: robot name, name the robot, name that robot, name for a robot, shell bash, in linux shell script, bash 0, uniq, linux bash script, d robot, bash script, awk, awk shell script, linux bash shell, linux connections, cut lines, awk command, refresh script, shell sort, grep awk

Om arbejdsgiveren:
( 58 bedømmelser ) Nottingham, United Kingdom

Projekt ID: #5904698

Tildelt til:


Hello, work done watch -n 120 "netstat -pla|grep :http|awk {'print \$5'}|cut -d: -f 1|sort|uniq -c|sort -nrk 1" this command update information every 2 minutes, if you need change interval you must change "-n Flere

$4 USD / time
(0 bedømmelser)

3 freelancere byder i gennemsnit $4/time for dette job


Hi, I have 5 years experience in Linux and open source. I've setup hundreds of server with various type of services : mail (postfix, exim), apche, dns (bind), ftp, ssh, mysql, keepalived ... I'm also an expert in web a Flere

$5 USD / time
(13 bedømmelser)

Nie złożono jeszcze oferty.

$3 USD / time
(0 bedømmelser)