[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
stdin.
printf "one\ntwo\nthree\n" |
(
ssh -n example.com date
grep one
)
Bob
- bash3 on FreeBSD weirdness, Miek Gieben, 2006/06/28
- Re: bash3 on FreeBSD weirdness, Chet Ramey, 2006/06/28
- Re: bash3 on FreeBSD weirdness, Miek Gieben, 2006/06/29
- Re: bash3 on FreeBSD weirdness, Chet Ramey, 2006/06/29
- Re: bash3 on FreeBSD weirdness, Miek Gieben, 2006/06/29
- Re: bash3 on FreeBSD weirdness,
Bob Proulx <=
- Re: bash3 on FreeBSD weirdness, Miek Gieben, 2006/06/29
- Re: bash3 on FreeBSD weirdness, Bob Proulx, 2006/06/30
- Re: bash3 on FreeBSD weirdness, Miek Gieben, 2006/06/30