[comp.unix.shell] Need help with remote shell

dave@aspect.UUCP (Dave Corcoran) (10/30/90)

"Hello World\n"

Is there a .login or .cshrc or .profile which is read upon startup
of a remote shell? i.e. remsh in Motorola SYSV (rsh in SunOs).

If I issue the command 

	remsh host date

I get eastern standard time. I can, however, issue

	remsh host TZ=$TZ date

and get the date adjusted to the timezone of the local machine (assuming
the host "runs" sh or ksh).

This is all well and good for simple commands. What I need is a way
to cause the remote shell to read some .profile by default to set up the
ENV without resorting to

	remsh host ". /u/me/.profile; command"

for each command. It just seems inelegant.
-- 
David Corcoran		-@@
uunet!aspect!dave	  ~
Good, fast, cheap; pick any two.

michaelp@dadla.WR.TEK.COM (Michael Prusynski) (11/10/90)

dave@aspect.UUCP (Dave Corcoran) writes:
>Is there a .login or .cshrc or .profile which is read upon startup
>of a remote shell? i.e. remsh in Motorola SYSV (rsh in SunOs).
>
>If I issue the command:  remsh host date
>
>I get eastern standard time. I can, however, issue:  remsh host TZ=$TZ date
>
>and get the date adjusted to the timezone of the local machine (assuming
>the host "runs" sh or ksh).
>
>This is all well and good for simple commands. What I need is a way
>to cause the remote shell to read some .profile by default to set up the
>ENV without resorting to:  remsh host ". /u/me/.profile; command"
>for each command. It just seems inelegant.

I have a Bourne shell script in my $HOME directory called "do", as follows:

PATH=/u/michaelp/bin:/usr/local:/usr/ens/bin:/usr/tek:/usr/ucb:/bin:/usr/bin:/usr/local/tek/bin
exec $@

then if I'm not sure the remote command is in the default path on the
remote host, I type:  rsh remhost do command arg1 arg2...
-----
Michael Prusynski (michaelp@dadla.WR.TEK.COM)   Phone: (503) 629-3062
USMail:  Tektronix Inc., MS 92-304, PO Box 4600, Beaverton, OR 97076    __o
  UUCP:  ...!uunet!tektronix!dadla.WR.TEK.COM!michaelp                 -\<,
  ARPA:  @RELAY.CS.NET:michaelp@dadla.WR.TEK.COM                  ....O/ O