Package: bash
Version: 3.2-4
Severity: normal

I'm not really sure whose fault this is, because the circumstances where
the problem manifests itself are so specific.  This is the shortest
example I could find to reproduce the problem:

--- clip ---
while read line; do ssh somemachine echo "'$line'" | tr a a; done < somefile
--- clip ---

This command will _not_ echo all lines in koe.c, and the number of lines
it manages to echo seems to vary indeterministically:

--- clip ---
[ate...@aulis ~]$ while read rivi; do ssh oiva echo "'$rivi'" | tr a a; done < 
tmp/koe.c 
void f( char ** const w ) {};

int main( int argc, char * argv[] ) {

char foo[10];
char * p = &foo[0];
[ate...@aulis ~]$ while read rivi; do ssh oiva echo "'$rivi'" | tr a a; done < 
tmp/koe.c 
void f( char ** const w ) {};
[ate...@aulis ~]$ 
--- clip ---

All of these ingredients seem to be necessary to trigger the problem:
while loop with read, making a pipe within the while loop, and using ssh
in the pipe.  That is, if I replace "ssh oiva echo" with just "echo",
all lines get echoed; if I leave off "| tr a a", all lines get echoed.
I couldn't find any other program except ssh that I could get to
reproduce the problem.  This seems very peculiar.

regards, Panu

-- System Information:
Debian Release: 5.0.6
  APT prefers stable
  APT policy: (990, 'stable'), (10, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages bash depends on:
ii  base-files                5lenny7        Debian base system miscellaneous f
ii  debianutils               2.30           Miscellaneous utilities specific t
ii  libc6                     2.7-18lenny6   GNU C Library: Shared libraries
ii  libncurses5               5.7+20081213-1 shared libraries for terminal hand

Versions of packages bash recommends:
ii  bash-completion               20080705   programmable completion for the ba

Versions of packages bash suggests:
pn  bash-doc                      <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to