\begin{Michael Lake}
> I have a few things echoed to the screen by .bashrc
> I can turn them off but there must be a way to ignore output of ssh before 
> root runs the tar program.

then thats a bug in your .bashrc

several suggestions for your .bashrc:

 only echo if bash is in "interactive" mode (don't know how you check
 that off the top of my head. in tcsh you see if $prompt is defined)

 only echo if stdout is a tty (test -t 1)

 echo to stderr (echo foo >&2) instead

 don't echo anything


the only way around it that i can tell is to put some marker in then
strip off everything before the marker:

 ssh user@host 'echo __START-HERE__; tar cvf - /path' | \
  sed '1,/^__START-HERE__$/d' | dd of=/dev/mt0

but thats bodgy. fix the real problem, otherwise rsync, etc won't work
either.


note that (GNU) tar can do "tar -f host:/path" directly, using
whatever your "rsh" command ends up running (hopefully ssh). see
tar.info and rmt(8)

-- 
 - Gus

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to