I gang

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!

Færdigheder: 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, linux simple shell, simple review script, simple shell linux, script bash, simple shell script

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

Projekt-ID: #5904698

Tildelt til:

pitradich

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 Mere

$4 USD / hour
(0 bedømmelser)
0.0

3 freelancers are bidding on average $4/hour for this job

ChuyenGiaSon

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 Mere

$5 USD / hour
(13 bedømmelser)
3.7
bartekchojnicki

Nie złożono jeszcze oferty.

$3 USD / hour
(0 bedømmelser)
0.0