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
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash