rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: culliton@srg.af.mil (Tom Culliton x2278)
To: rc@hawkwind.utcs.toronto.edu
Subject: Differences between Duff's rc and Byron's
Date: Tue, 25 May 1993 18:42:17 -0400	[thread overview]
Message-ID: <9305251842.aa27768@ceres.srg.af.mil> (raw)

A while ago it struck me that the man page only covered some of the
differences between Duff's Plan 9 version of rc and Bryon's Unix
version.  So out of curiosity and a desire to understand rc better, I
set out to assemble my own list of differences.  The following is the
best list that I have been able to assemble from Byron's and the Plan 9
man pages, Tom Duff's paper and miscellaneous info from the mailing
list.  If I've made any mistakes feel free to correct me.

Any time there is a comparison below the Plan 9 form occurs first.  If
you want more detail on any of these please see the original sources
listed above.

- Command line switches

	Plan 9	Unix
	------  ----
	-c	-c	same
	-d	-d	no-op vs. debug enable SIGQUIT/SIGTERM
	-e	-e	same
	-i	-i	same
	-I		force NON-interactive
	-l	-l	same
		-n
		-o
	-p	-p	no-op vs. disable function import
	-r		debugging info
	-s	-s	print non-zero status vs. sh/csh compatibility
	-v	-v	same
	-V		???
	-x	-x	same

- builtin break and return

	Plan 9 doesn't have these but they're awfully handy.

- <<< here strings

	This fixes something noted as a bug in the Plan 9 man page.

- builtin flag

	It might be nice to have this Plan 9 feature.

- . searching the path

	Plan 9 does this, it might be handy but it might also be very
	dangerous.

- whatis -s option

	Byron added -s to show all the signal handling.

- rfork vs. newpgrp (System dependent)

	Plan 9 has a more capable fork system call than Unix and rfork
	takes advantage of it.  It might be interesting to try to
	emulate it, but then I've never even needed to use newpgrp.

- if not vs. else

	This seems like an arbitrary difference.  Syntactic sugar.

- $" vs. $^

	This seems like an arbitrary difference.

- `{word} vs. `word

	On very rare occasions this saves me typing two braces, it seems
	like an arbitrary difference.

- $status

	The difference here seems to make Byron's rc better adapted to Unix.

- pattern matching, word vs. list

	This fixes something noted as a bug in the Plan 9 man page.

- fn prompt

	Plan 9 doesn't have this but it's VERY handy.

- builtin echo

	A concession to performance.

- additional variables: history, apids, CDPATH, HOME, PATH

	Plan 9 may use history and not just not mention it in the man
	page, apids is a great idea, the rest are for Unix compatibility.

- exec of builtins

	A bug fix IMHO.

- ``

	This one seems like a gratuitous addition to me.

- default prompt ('% ' ' ') vs. ('; ' '')

	Byron's reasons seem to make sense, and you can change it to
	whatever you want anyway.

- startup file $home/lib/profile vs. $home/.rcrc

	An adaptation to Unix.

- environment handling (system dependent)

- different signal handlers (system dependent)

- . -i (???)

	Duff's paper mentions this but the man page doesn't.


             reply	other threads:[~1993-05-25 23:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-25 22:42 Tom Culliton x2278 [this message]
1993-05-25 23:32 Alan Watson
1993-05-26 16:53 Paul Haahr
1993-05-26 17:55 ` Chris Siebenmann
1993-05-29 12:34   ` John Mackin
1993-05-26 17:06 Paul Haahr
1993-05-26 17:38 Tom Culliton x2278
1993-05-26 17:58 Paul Haahr
1993-05-26 20:31 ` Chris Siebenmann
1993-05-26 20:32 ` Chris Siebenmann
1993-05-27  5:02 Alan Watson
1993-05-27  6:48 Paul Haahr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9305251842.aa27768@ceres.srg.af.mil \
    --to=culliton@srg.af.mil \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).