remote shells
Jonathan I. Kamens
jik at athena.mit.edu
Thu Apr 4 07:17:42 AEST 1991
In article <3688 at ux.acs.umn.edu>, edh at ux.acs.umn.edu (Merlinus Ambrosius) writes:
|> #!/bin/sh
|> RHOST=apple-gunkies
|> rsh $RHOST 'echo here I am on $RHOST!'
Use double quotes instead of single quotes. variable substitutions occur
inside double quotes, but not inside single quotes. Observe:
% /bin/sh
$ RHOST=apple-gunkies
$ echo "here I am on $RHOST!"
here I am on apple-gunkies!
$ echo 'here I am on $RHOST'
here I am on $RHOST
Quoting from our sh(1):
A character may be quoted by preceding it with a \. \new-
line is ignored. All characters enclosed between a pair of
quote marks (''), except a single quote, are quoted. Inside
double quotes ("") parameter and command substitution occurs
and \ quotes the characters \ ' " and $.
--
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8085 Home: 617-782-0710
More information about the Comp.unix.shell
mailing list