Re: Bad PIPESTATUS when using eval with a pipe stored in a variable

2005-06-30 Thread Philippe Torche
Thanks to all. Per chance I can do my job by simple code change. Philippe. ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Bad PIPESTATUS when using eval with a pipe stored in a variable

2005-06-30 Thread Paul Jarc
Philippe Torche <[EMAIL PROTECTED]> wrote: > aPipe='|' > eval echo 'titi' $aPipe grep toto | grep titi This is equivalent to: eval "echo titi | grep toto" | grep titi The whole eval counts as one pipeline element, regardless of what's inside it, so the top-level pipeline is only connecting two co

Re: Bad PIPESTATUS when using eval with a pipe stored in a variable

2005-06-30 Thread Chet Ramey
Philippe Torche wrote: > The following script use eval with 3 pipes, 1st time with direct pipe on > the command line, and the 2nd time with a pipe in a variable. > In this second eval, the PIPESTATUS does not content 3 entries, but only 2. > > cat <<'EOF' > eval_pipe.sh > #!/bin/env bash > set -u

Bad PIPESTATUS when using eval with a pipe stored in a variable

2005-06-29 Thread Philippe Torche
The following script use eval with 3 pipes, 1st time with direct pipe on the command line, and the 2nd time with a pipe in a variable. In this second eval, the PIPESTATUS does not content 3 entries, but only 2. cat <<'EOF' > eval_pipe.sh #!/bin/env bash set -u eval echo 'titi' | grep toto | grep