Re: OT Shell tricks: I'll kill you later

2004-05-24 Thread Karsten M. Self
on Sun, May 23, 2004 at 01:18:01AM -0600, Bob Proulx ([EMAIL PROTECTED]) wrote: > Karsten M. Self wrote: > > while sleep 600 > > do > > ps aux | awk '/[w]hois/ {print $2}' | ( sleep 30; xargs kill ) > > done > > Clever. I like the concept. But I don't like the ps side of the

Re: OT Shell tricks: I'll kill you later

2004-05-23 Thread Bob Proulx
Karsten M. Self wrote: > while sleep 600 > do > ps aux | awk '/[w]hois/ {print $2}' | ( sleep 30; xargs kill ) > done Clever. I like the concept. But I don't like the ps side of the implementation. The format is slightly different depending upon the state of the process. Al

Re: OT Shell tricks: I'll kill you later

2004-05-21 Thread Martin Dickopp
"Karsten M. Self" <[EMAIL PROTECTED]> writes: > I have few ugly shell scripts which do a lot of WHOIS queries, which > I've found are prone to hang for a long time. The simple thing to do is > to hunt for whois queries, then, and periodically kill them: > > while sleep 600 > do >

OT Shell tricks: I'll kill you later

2004-05-20 Thread Karsten M. Self
I have few ugly shell scripts which do a lot of WHOIS queries, which I've found are prone to hang for a long time. The simple thing to do is to hunt for whois queries, then, and periodically kill them: while sleep 600 do ps aux | awk '/[w]hois/ {print $2}' | xargs kill done O