Sergiu wrote:
>> please find an error detected when is used a combination of "xargs" and
>> "grep", arguments {} are not substituted in grep construction:

I believe that all your examples, both expected (count of "1" resulting)
and apparently unexpected (outputs of "i i 0") are working as expected.

I am guessing (am I right?) that you were expecting outputs of "i i 1"
or some such from your last six more complex examples using xargs,
however that "echo inga | grep -c $a" is working on an $a value that
is still inside the $( ... ) or ` ... ` command substitution, and thus equal
to '{}', with $a not yet set to "i" by the final execution of the xargs
invocation of the output from that command substitution.

-- 
                Paul Jackson
                p...@usa.net



Reply via email to