[comp.unix.questions] Bourne shell semicolon quoting problem

holtz@strawdog.Eng.Sun.COM (Brian Holtz) (06/29/90)

I'm hacking the rcmd script from the X11R4 distribution to also export
the NeWS NEWSSERVER envariable.  The problem: NEWSSERVER has an embedded
semicolon, which makes the shell on the other end of the rsh think
that everthing in the NEWSSERVER string after the semicolon is another
command.  I've tried 2 or 3 escape conventions on this, none with any
success.  How do I do it?


echo "NEWSSERVER=${string_with_semicolon};export NEWSSERVER;TERM=$TERM;export TERM;DISPLAY=$DISPLAY;export DISPLAY;($*)" '> /dev/null 2>&1 &' | rsh $host /bin/sh &
--
Brian Holtz (holtz@netcord.Eng.Sun.COM)