Question : Bash Script to kill some instances

Hi,

I need a little Bash Script, to be executed as a cron job, say, each 30 minutes and just do:

1) Issue the command (lsof -i | grep irc) to see if there's any IRC connection established.

2) If there's not it will do nothing. If there is any, it shall list one or more lines like this:

named 6059 named 25u IPv4 20094  TCP briden.striger.ru:irc (LISTEN)
named 3219 named 25u IPv4 20094  TCP briden.striger.ru:irc -> nnn.nnn.nnn.nnn (ESTABLISHED)

3) In this case, it would kill all the instances listed, issuing, as in this example:

kill 6059
kill 3219

Thanks a lot.

Mario./

Answer : Bash Script to kill some instances

What kinds of problems are you concerned about?  There are quite a few good bulk email companies including iContact, Constant Contact, AWeber, MailChimp, and others.  But there are also problems with bulk email that will exist no matter who you choose.
Random Solutions  
 
programming4us programming4us