rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* -c arguents
@ 1993-11-01 18:35 Alan Watson
  1993-11-01 18:47 ` John Mackin
  1993-11-01 18:50 ` Robert van Liere
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Watson @ 1993-11-01 18:35 UTC (permalink / raw)
  To: rc

I've just discovered a minor incompatibility between rc and sh:

	sh -ce foo	# execute foo and exit on any error
	rc -ce foo	# execute e with an argument of foo

rc is behaving according to the manual page, so this is not a bug,
however, I wonder if the behaviour should be changed to follow that of
sh?

I came across this using make on our new SGI machine -- it executes
commands with $SHELL -ce ... and I had forgotten to explicity set SHELL
to sh within the Makefile.

Alan.


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

* Re: -c arguents
  1993-11-01 18:35 -c arguents Alan Watson
@ 1993-11-01 18:47 ` John Mackin
  1993-11-01 18:50 ` Robert van Liere
  1 sibling, 0 replies; 4+ messages in thread
From: John Mackin @ 1993-11-01 18:47 UTC (permalink / raw)
  To: rc

    I wonder if the behaviour should be changed to follow that of sh?

It absolutely and definitely should be so changed.

OK,
John.


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

* Re: -c arguents
  1993-11-01 18:35 -c arguents Alan Watson
  1993-11-01 18:47 ` John Mackin
@ 1993-11-01 18:50 ` Robert van Liere
  1 sibling, 0 replies; 4+ messages in thread
From: Robert van Liere @ 1993-11-01 18:50 UTC (permalink / raw)
  To: Alan Watson; +Cc: rc


> I wonder if the behaviour should be changed to follow that of sh?

I've reported this to Byron more than a year ago. This was
his reply.

-- Robert

> 2) make on the sgi has a bug: it executes its shell with "$SHELL -ce command"
> and since rc uses getopt(3) to process its arguments (hardly nonstandard,
> imho) rc sees the single command "e" followed by a bunch of arguments which
> it places in $*. One fix is to place a copy of make in a different directory,
> edit it with, say, emacs, and transpose the order of the letters "ce". That
> will make it invoke rc correctly.
> 
> One caveat: many makefiles out there break when you use rc as a shell. It is
> a bug, imo, that sgi's make does not default to sh unless explicitly overriden
> via SHELL. I believe other makes operate in that fashion.





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

* Re: -c arguents
@ 1993-11-01 19:16 Tom Culliton x2278
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Culliton x2278 @ 1993-11-01 19:16 UTC (permalink / raw)
  To: alan, rc

This is a stupid bug in make if you ask me.  I encountered the same
problem with SCO Unix, and fixed make on our base system tape to do the
right thing by flipping -ce to -ec.

Tom


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

end of thread, other threads:[~1993-11-01 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-11-01 18:35 -c arguents Alan Watson
1993-11-01 18:47 ` John Mackin
1993-11-01 18:50 ` Robert van Liere
1993-11-01 19:16 Tom Culliton x2278

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).