> On Wed, Mar 11, 2009 at 09:50:18PM -0400, m...@ice.filescope.com wrote: > > rm 2>&1 | grep --color op > > rm |& grep --color op > > > > Notice that they are behaving differently. > > Confirmed in 4.0.0 and 4.0.10:
Interesting. Only for non-builtin simple commands and some shell functions. The attached patch fixes it for me. Chet
*** ../bash-4.0-patched/parse.y 2009-03-09 10:27:05.000000000 -0400 --- parse.y 2009-03-12 09:02:31.000000000 -0400 *************** *** 1123,1127 **** REDIRECT *r; ! tc = $1; rd.dest = 1; r = make_redirection (2, r_duplicating_output, rd); --- 1123,1127 ---- REDIRECT *r; ! tc = $1->type == cm_simple ? $1->value.Simple : $1; rd.dest = 1; r = make_redirection (2, r_duplicating_output, rd);
``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU c...@case.edu http://tiswww.tis.case.edu/~chet/