From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from karon.dynas.se ([192.71.43.4]) by hawkwind.utcs.utoronto.ca with SMTP id <24695>; Sat, 30 May 1998 16:32:36 -0400 Received: (qmail 13356 invoked from network); 26 May 1998 06:25:02 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by karon.dynas.se with SMTP; 26 May 1998 06:25:01 -0000 Received: from pommac.dynas.se by spirit.dynas.se with smtp (Smail3.1.28.1 #32) id m0yeDAT-000JeeC; Tue, 26 May 98 08:25:01 +0200 Message-Id: Date: Tue, 26 May 1998 02:25:01 -0400 From: bengt Reply-To: bengt Subject: Re: problems with an rc script called from cron To: joe@earthlight.co.nz Cc: rc@hawkwind.utcs.toronto.edu MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: Aa2qvx4x0ZxiOjYXh1d32A== X-Mailer: dtmail 1.2.0 CDE Version 1.2 SunOS 5.6 i86pc i386 > I am having problems with the following script > > ============================================================ > #! /usr/bin/rc > > res=`{telnet phoenix.earthlight.co.nz 4647 >[2] /dev/null} > echo `{date} ' ' $res(10) >> /home/joe/bin/modemcheck.log > if ( ~ $res 1 2 3 ) {killppp 900 } > ============================================================ > > This script works fine when called from the command line but when run > from cron nothing is returned in the variable $res. > > Anyone have any suggestions as to what is going wrong here. No suggestions yet, but could you answer the following. What happens if you use "echo hello" insted of "telnet ..."? What happens if you do the same thing using "sh"? > ps. I am I still on this list as things seem to have been very quite > recently. Lists are full of 1) Bug reports or 2) Pleas for new features or 3) "How do I do this?" My guess is that: There is not many bugs left in rc. The users of rc thinks there should not be more features (I do. I would actually like to get rid of else and reinstate ifnot). The users of rc are competent enough to handle the things they want to do. Best Wishes, Bengt =============================================================== Everything aforementioned should be regarded as totally private opinions, and nothing else. bengt@softwell.se ``His great strength is that he is uncompromising. It would make him physically ill to think of programming in C++.''