Luís Gomes wrote: > Hello Jim, > > My mistake. I am sorry that I have bothered you! > > I have checked my aliases and it happens that I have colordiff aliased to > diff. > Calling /usr/bin/diff directly does not reproduce the error (but > calling colordiff does). > > I will send the bug report to colordiff people, and I promise to be > more careful next time.
Thanks for explaining. > On Wed, Aug 3, 2011 at 11:29 PM, Jim Meyering <[email protected]> wrote: >> Luís Gomes wrote: >>> I think I have found a BUG in diff (version 3.0). >>> >>> Steps to reproduce the bug (assuming shell is bash): >>> >>> $ echo -n hello | diff <(echo -n hello) - >>> 1d0 >>> < hello >>> \ No newline at end of file >>> >>> Expected result: no output at all (no differences). >> >> Thanks for the report. >> However, I cannot reproduce it. >> >> Used as above and below, echo and printf are built-in functions, >> so to reproduce, I suggest you use bash like this: >> >> $ bash -c 'printf hello | diff <(printf hello) -' >> $ bash --version|head -1 >> GNU bash, version 4.1.7(1)-release (i386-redhat-linux-gnu) >> >> If that fails too, then add "tee" uses to get copies of the inputs: >> >> printf hello | tee 1 | diff <(printf hello | tee 2) - >> >> then compare the files, "1" and "2" to see if they >> contain 5 or 6 bytes.
