GNU bug report logs -
#28469
xargs arguments are not passed to grep
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello,
please find an error detected when is used a combination of "xargs" and
"grep", arguments {} are not substituted in grep construction:
expected results:
echo "inga"|grep -c "i"
1
user <at> box1:~$ a="i"; echo `echo "inga"|grep -c $a`
1
but was necessary tu use it in combination with xargs:
user <at> box1:~$ echo "i" | xargs -I{} echo $(echo {} ;a=$(echo {}) ; echo $a ;
echo "inga"|grep -c $a)
i i 0
user <at> box1:~$ echo "i" | xargs -I{} echo $(echo {} ;a=`echo {}` ; echo $a ;
echo "inga"|grep -c $a)
i i 0
user <at> box1:~$ echo "i" | xargs -I{} echo $(echo {} ;a={} ; echo $a ; echo
"inga"|grep -c $a)
i i 0
user <at> box1:~$ echo "i" | xargs -I{} echo `echo {} ;a={} ; echo $a ; echo
"inga"|grep -c $a`
i i 0
user <at> box1:~$ echo "i" | xargs -I{} echo `echo {} ;a={} ; echo $a ; echo
"inga"|grep -c $a`
i i 0
user <at> box1:~$ echo "i" | xargs -I{} echo `echo {} ;a={} ; echo $a ; echo
"inga"|grep -c $a`
i i 0
Thanks,
Sergiu Bordei
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.