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: More stuff related to exec...
Date: Thu, 3 Dec 1992 11:37:31 -0500	[thread overview]
Message-ID: <9212031137.aa29960@ceres.srg.af.mil> (raw)

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


             reply	other threads:[~1992-12-03 17:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-12-03 16:37 Tom Culliton x2278 [this message]
1992-12-03 21:11 ` noel
1992-12-03 23:22   ` David J. Fiander
1992-12-04  2:38 Tom Culliton x2278
1992-12-04 14:52 Chet Ramey

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=9212031137.aa29960@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).