[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash3 on FreeBSD weirdness

From: Bob Proulx
Subject: Re: bash3 on FreeBSD weirdness
Date: Thu, 29 Jun 2006 11:10:04 -0600
User-agent: Mutt/1.5.9i

Chet Ramey wrote:
> Miek Gieben wrote:
> > okay, here it it. 

Better would have been to share that with the mailing list.  :-(

> The root cause is probably that something is consuming all of the
> input from stdin (the pipe) on FreeBSD and not on Linux.  I suspect
> the call to `head'.  The two implementations probably read and buffer
> differently.  This happens all the time, mostly with ssh.

With ssh for batch mode scripts that are not expected to read stdin it
is important to include the -n option.  Otherwise ssh itself consumes

  printf "one\ntwo\nthree\n" |
    ssh -n example.com date
    grep one


reply via email to

[Prev in Thread] Current Thread [Next in Thread]