Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!mintaka!ogicse!sequent!muncher.sequent.com!calvin From: calvin@sequent.com Newsgroups: comp.unix.shell Subject: Re: remote shells Message-ID: <1991Apr3.235051.16563@sequent.com> Date: 3 Apr 91 23:50:51 GMT Article-I.D.: sequent.1991Apr3.235051.16563 References: <3688@ux.acs.umn.edu> Sender: news@sequent.com (News on Muncher) Organization: Sequent Computer Systems, Inc. Lines: 23 In article <3688@ux.acs.umn.edu> edh@ux.acs.umn.edu (Merlinus Ambrosius) writes: >Is it possible to do this? > >#!/bin/sh >RHOST=apple-gunkies >rsh $RHOST 'echo here I am on $RHOST!' > >When I try this, it says "RHOST undefined". I am sure this is because the >shell on the remote host doesn't have RHOST defined (of course). Is it >possible to pass the definition of RHOST on through the rsh? you might try using double quotes. that way the variable $RHOST gets parsed before the rsh is executed. Calvin Goodrich / calvin@sequent.com / a\=k)4vk!%t@$+... (beep!) "Scotty, we need that .sig in thirty seconds or we're all dead!" "Och, Captain! We canna do anathin'! It's still on yir other account!" -- Starfleet. It's not just an adventure, it's a job. --