rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* Re: problems with an rc script called from cron
@ 1998-06-05 15:59 Byron Rakitzis
  0 siblings, 0 replies; 5+ messages in thread
From: Byron Rakitzis @ 1998-06-05 15:59 UTC (permalink / raw)
  To: bengt, noel; +Cc: rc

> I had and interesting discussion with Byron about this when he
> first released rc. His response was somewhat less than favourable.

Well, I am not sure I see any change since then that would make my
opinion of "if not" more favorable. First of all, it's just the
wrong way to write a conditional. It reminds me more of assembly
language programming than any high level language I know! If I
remember correctly Duff's paper also describes it as a bug in the
language spec. Secondly, rc (my reimplementation) has been around
now for 7 years and to break the syntax over a quibble like this
seems to me contrary to what we've worked for to this point: a
stable, reliable shell.  Thirdly, I am not aware of what the state
of plan 9 is these days, but I assume from a practical point of view
it's at best a curiosity, and no one has ever written to me about
the need for interoperating unix and plan 9 rc scripts.

So I just don't see any reason to make this change.

Byron.



^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: problems with an rc script called from cron
@ 1998-05-31  5:56 Noel Hunt
  0 siblings, 0 replies; 5+ messages in thread
From: Noel Hunt @ 1998-05-31  5:56 UTC (permalink / raw)
  To: bengt; +Cc: 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).

I had and interesting discussion with Byron about this when he
first released rc. His response was somewhat less than favourable.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: problems with an rc script called from cron
@ 1998-05-26  6:25 bengt
  0 siblings, 0 replies; 5+ messages in thread
From: bengt @ 1998-05-26  6:25 UTC (permalink / raw)
  To: joe; +Cc: rc

 
> 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++.''



^ permalink raw reply	[flat|nested] 5+ messages in thread
* problems with an rc script called from cron
@ 1998-05-24 14:35 Joseph Skinner
  1998-05-26 14:28 ` Paul Haahr
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph Skinner @ 1998-05-24 14:35 UTC (permalink / raw)
  To: rc

Hi

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.

Joe.

ps. I am I still on this list as things seem to have been very quite
recently.


-- 
=======================================================================
in real life: Joseph Skinner         |There's no such thing as a wizard
email: joe@earthlight.co.nz          |who minds his own business
       Analyst/Programmer ECL        | - Berengis the Black
http:  www.earthlight.co.nz/users/joe|   Court Mage to the Earls Caeline
========================================================================


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-06-07 16:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-05 15:59 problems with an rc script called from cron Byron Rakitzis
  -- strict thread matches above, loose matches on Subject: below --
1998-05-31  5:56 Noel Hunt
1998-05-26  6:25 bengt
1998-05-24 14:35 Joseph Skinner
1998-05-26 14:28 ` Paul Haahr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).