Newsgroups: comp.unix.shell Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!gumby!umich!umeecs!zip!bagchi From: bagchi@eecs.umich.edu (Ranjan Bagchi) Subject: time limit on commands? Message-ID: Sender: usenet@zip.eecs.umich.edu (Mr. News) Organization: Recreational Creationists, Inc. Date: Mon, 6 May 1991 00:40:22 GMT I've got a (t)csh script which runs finger over a long list of hostnames. What happens quickly is that one host is down/hung and finger doesn't abort, so my script can keep doing its jobs. In lieu of writing a C program (or learning perl), I ask the net: Is there any way I can specify a timeout for a command in say, seconds, after which the program aborts? Just wondering...rj -- -------------------------------------------------------------------------------- Ranjan Bagchi - asleep...... | v,i,j,k,l,s,a[99]; bagchi@eecs.umich.edu | main() { ------------------------------- for(scanf("%d",&s);*a-s;v=a[j*=v]-a[i],k=i=s*k&&++a[--i]) ; } /* Osovlanski and Nissenbaum */ --------------------------------------------------------------------------------