From: Scott Schwartz <schwartz@groucho.cs.psu.edu>
To: Donn Cave <donn@u.washington.edu>
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: subshell, interactive, login, etc
Date: Thu, 25 Jun 1992 22:07:30 -0400 [thread overview]
Message-ID: <92Jun25.220752edt.2536@groucho.cs.psu.edu> (raw)
In-Reply-To: Your message of "Thu, 25 Jun 92 21:41:59 EDT." <9206260141.AA07285@carson.u.washington.edu>
| I've complained in the past that rshd invokes one's shell without the
| leading minus sign that would make it a login shell, so .rcrc (or .profile,
| or whatever) doesn't get run. This makes it hard to invoke something
| that's not in a system standard execution path, via rsh.
I've been using this lately. It seems like an adequate workaround.
#!/bin/rc -p
# usage: rrc [-n] host cmd
bg=(); quietly=(); sanely='>[3=] >[4=] >[5=] >[6=] >[7=]';
host=$1; shift
if (~ -n $host) {
bg='&'
quietly='>[0]/dev/null >[1=0] >[2=0]'
host=$1; shift
}
{ whatis PATH DISPLAY TERM TERMCAP TERMINFO >[2]/dev/null
echo exec $sanely
echo . .rcrc
echo '{' $* '}' $quietly $bg
exit
} | rsh $host exec /bin/rc
next prev parent reply other threads:[~1992-06-26 2:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1992-06-26 1:41 Donn Cave
1992-06-26 2:07 ` Scott Schwartz [this message]
1992-06-26 8:10 ` Matthew Farwell
-- strict thread matches above, loose matches on Subject: below --
1992-06-26 13:57 Matthew Farwell
1992-06-26 10:33 malte
1992-06-26 3:57 Alan Watson
1992-06-26 0:26 D. Borkovic
1992-06-26 0:42 ` Scott Schwartz
1992-06-26 1:39 ` Chris Siebenmann
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=92Jun25.220752edt.2536@groucho.cs.psu.edu \
--to=schwartz@groucho.cs.psu.edu \
--cc=donn@u.washington.edu \
--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).