From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from milton.u.washington.edu ([128.95.136.1]) by hawkwind.utcs.toronto.edu with SMTP id <2721>; Wed, 1 Jul 1992 16:49:11 -0400 Received: by milton.u.washington.edu (5.65/UW-NDC Revision: 2.22 ) id AA15956; Wed, 1 Jul 92 13:49:03 -0700 Date: Wed, 1 Jul 1992 16:49:03 -0400 From: Donn Cave Message-Id: <9207012049.AA15956@milton.u.washington.edu> Sender: donn@milton.u.washington.edu To: rc@hawkwind.utcs.toronto.edu Subject: Re: rc and rsh | I don't think I understand the problems people are having with rsh and rc. | Does this function do the 'right thing' ? | fn rsh host1 host2... { flag= host=$0 { | ~ $1 -n && { shift ; flag=-n } | ~ $0 rsh && { host=$1 ; shift } | eval 'rsh $flag $host rc -lc ''' ^ $* ^ '''' | } } Well, I can't resist pointing out that there are some implementation details involving quotes. That's supposed to be one of the reasons we like rc, right? Easy, straightforward quoting! Someone who knows the language better than I maybe can straighten this one out so that it doesn't require the user to quote the remote command (I think this is just a matter of discarding the "^"s), and so that the eventual rc -lc actually does get a quoted string. But then, what happens when you use this? ; rsh wherever do something rc not found ; /usr/ucb/rsh wherever whatis path path=('' /usr/ucb /bin /usr/bin) ; rlogin wherever welcome to wherever ; whatis rc /usr/local/bin/rc Not that there aren't ways to work around the problem. Some of them made it onto this list recently, and the most workable of them involved invoking rc differently from /etc/passwd - either as "-rc", or a script that invokes "rc -l". Donn Cave, University Computing Services, University of Washington donn@cac.washington.edu