From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from groucho.cs.psu.edu ([130.203.2.10]) by hawkwind.utcs.toronto.edu with SMTP id <2755>; Thu, 25 Jun 1992 22:08:28 -0400 Received: from localhost by groucho.cs.psu.edu with SMTP id <2536>; Thu, 25 Jun 1992 22:07:52 -0400 To: Donn Cave cc: rc@hawkwind.utcs.toronto.edu Subject: Re: subshell, interactive, login, etc In-reply-to: Your message of "Thu, 25 Jun 92 21:41:59 EDT." <9206260141.AA07285@carson.u.washington.edu> Date: Thu, 25 Jun 1992 22:07:30 -0400 From: Scott Schwartz Message-Id: <92Jun25.220752edt.2536@groucho.cs.psu.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