From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay1.UU.NET ([137.39.1.5]) by hawkwind.utcs.toronto.edu with SMTP id <2237>; Thu, 3 Dec 1992 12:41:25 -0500 Received: from uunet.uu.net (via LOCALHOST.UU.NET) by relay1.UU.NET with SMTP (5.61/UUNET-internet-primary) id AA28316; Thu, 3 Dec 92 12:40:59 -0500 Received: from srg.UUCP by uunet.uu.net with UUCP/RMAIL (queueing-rmail) id 123938.26450; Thu, 3 Dec 1992 12:39:38 EST Received: from ceres.srg.af.mil by srg.srg.af.mil id aa06993; Thu, 3 Dec 92 11:36:08 EST From: culliton@srg.af.mil (Tom Culliton x2278) X-Mailer: SCO System V Mail (version 3.2) To: rc@hawkwind.utcs.toronto.edu Subject: More stuff related to exec... Date: Thu, 3 Dec 1992 11:37:31 -0500 Message-Id: <9212031137.aa29960@ceres.srg.af.mil> Here, presented for your amusement, is a cute little stunt that sh, ksh, and csh do and that rc, and bash do not. If you have occasion to use the "newgrp" command or read the man page it says that when you run newgrp it replaces the current shell (effectively an exec) this obviously entails magic within the shells (try "strings /bin/sh | grep newgrp") Not only that, but newgrp seems to revert to the shell named in the login file, ignoring the current setting of SHELL. If you care about the exec behaviour you can obviously create a newgrp function ("fn newgrp { exec /bin/newgrp $* }"). As for the other, it looks like that's just the way the ball bounces. Isn't unix fun? ;-) Tom