Dan Jacobson wrote: > Package: openssh-client > Version: 1:4.6p1-5 > Severity: normal > File: /usr/bin/ssh > > Why does this script not finish, only when using su, and only when > using ssh? > > # cat script > su my_username_here <<\EOEOE > set -x > echo $- #no -e here, see > remote=my.remote.host.here > false > ssh $remote false #Why does this signal the parent to bomb out? > echo never got here
Because ssh, like its predecessor rsh, consumes its standard input unless given the -n option. Its standard input is the same as its parent's: the contents of the here document. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]