From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay1.UU.NET ([192.48.96.5]) by hawkwind.utcs.toronto.edu with SMTP id <2704>; Tue, 25 May 1993 19:14:25 -0400 Received: from spool.uu.net (via LOCALHOST) by relay1.UU.NET with SMTP (5.61/UUNET-internet-primary) id AA25746; Tue, 25 May 93 19:14:11 -0400 Received: from srg.UUCP by spool.uu.net with UUCP/RMAIL (queueing-rmail) id 191234.23234; Tue, 25 May 1993 19:12:34 EDT Received: from ceres.srg.af.mil by srg.srg.af.mil id aa07685; Tue, 25 May 93 18:41:13 EDT From: culliton@srg.af.mil (Tom Culliton x2278) X-Mailer: SCO System V Mail (version 3.2) To: rc@hawkwind.utcs.toronto.edu Subject: Differences between Duff's rc and Byron's Date: Tue, 25 May 1993 18:42:17 -0400 Message-Id: <9305251842.aa27768@ceres.srg.af.mil> 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.