Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!oliveb!jerry From: jerry@oliveb.olivetti.com (Jerry Aguirre) Newsgroups: comp.protocols.tcp-ip Subject: Re: rsh equivalent Message-ID: <17242@oliveb.olivetti.com> Date: 5 Mar 88 01:35:30 GMT References: <23511@hi.unm.edu> <2028@ho95e.ATT.COM> Reply-To: jerry@oliveb.UUCP (Jerry Aguirre) Organization: Olivetti ATC; Cupertino, Ca Lines: 36 In article <2028@ho95e.ATT.COM> wcs@ho95e.UUCP (46323-Bill.Stewart,2G218,x0705,) writes: >My big gripe with the r* programs is that they lose UNIX semantics. >For instance, rsh doesn't return the condition code from the remote process - > rsh foovax false >returns true if the connection succeeded. This is a real anoyance when writing automated procedures. I did find a work around though. Run something like: rsh foovax "command && echo CMDOK" | grep CMDOK The returned status will now be that of the grep and will reflect the success of the remote (but not its actual status). This is good enough for scripts that need to check command success on remote systems. > Less important but harder to fix, >rsh is non-interactive; I've gotten real used to Datakit's remote execution >capabilities ("dk other3b /bin/ksh"). I don't understand what you mean by non-interactive. Certainly there is no tty or terminal type so screen oriented editors and such don't work. But I frequently run "rsh foovax sh -i" when I need to poke around on another system. Certainly that qualifies as interactive, at least as compared to batch. Certain programs do cause problems as they buffer their I/O when run under rsh but enough work for examining or fixing file modes, ownership, and such. > It would also be nice to have a >convenient rcp-variant that didn't update modification times. It wasn't all that long ago that "cp" acquired its "-p" option. In practical terms I usually find that I want to move multiple files and preserve more than even "cp -p" does. I usually run: tar cF - files ... | rsh 'cd dir && tar xpF -' This keeps dates, ownership, directory, and link structure. And then there is "rdist". Jerry Aguirre