Hi,
On Sat, Mar 16, 2002 at 06:53:36PM +0100, Niels Bakker wrote:
> > On Sat, 16 Mar 2002, Gert Doering wrote:
> >> Try "echo yes | rsh ..."
>
> * signal@shreve.net (Brian) [Sat 16 Mar 2002, 18:30 CET]:
> > That doesn't appear to work. I even tried using like "echo -e yes \r\n"
> > (and other combinations thereof). It hangs at the confirm prompt, I have
> > to suspend the process then kill it off.
>
> rsh reads from its tty, not from stdin.
This might depend. Our rsh implementations (Linux and FreeBSD) definitely
use stdin (if you send a command - if you just do "rsh host", it will
effectively do "rlogin" and use a pty) - we regularily do things like
"remote backup via rsh", which works over a pipe.
I just tried my variant (from a FreeBSD system to a 7200 12.0(21)S), and
it works fine...:
/home/gert$ echo y|rsh cisco clear count fa0/0
Clear "show interface" counters on this interface [confirm]y
gert
-- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany gert@greenie.muc.de fax: +49-89-35655025 gert.doering@physik.tu-muenchen.de
This archive was generated by hypermail 2b29 : Sun Aug 04 2002 - 04:13:38 EDT