[SunHELP] FW: tar copy/extract redirected over ssh, still need help

Chris Pinnock cjep at fawlty.net
Wed Sep 25 17:24:06 CDT 2002


On Wed, Sep 25, 2002 at 05:19:31PM -0400, Markham, Richard wrote:
> first I needed to adjust my execution method, by doin:
>  SOURCE_DIR=/test
>  if [ cd ${SOURCE_DIR} ]; then
>   /usr/local/bin/tar -cpzvf - ./ | \
>    ssh ${DEST_HOST} '/usr/local/bin/tar -x -C /test -pzvf -'
>  fi
> 
> I found out that using ${DEST_DIR}, $DEST_DIR or any variable
> after the -C switch will cause the tar process to fail.  Does
> anyone know a way that I can pass a variable after -C? What's 
> happening now is it stops Authentication successful.  If I 
> hard code a directory then it will work.

It will work if you use " instead of '.

i.e.
$ echo "$PATH"
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
$ echo '$PATH'
$PATH

best wishes,
Chris



More information about the SunHELP mailing list