[comp.unix.shell] time limit on commands?

bagchi@eecs.umich.edu (Ranjan Bagchi) (05/06/91)

	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,j+=(v=j<s&&(!k&&!!printf(2+"\n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&&++l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=0:++a[i])>=s*k&&++a[--i]) ;
					}  /* Osovlanski and Nissenbaum */
--------------------------------------------------------------------------------