grep 2.10 ignores -q when it thinks the output file is one of its input files. it gives error output: "grep: input file ... is also the output" and fails. this breaks all scripts which depend on -q option behaving appropriately. according to the man page, and previously, '-q' option is supposed to ignore errors and return 0 if the input is matched. this option means there should be no output, so checking the output file is inappropriate when -q is given. the NEWS for this release indicates 'grep now rejects a command like "grep -r pattern . > out", in which the output file is also one of the inputs, because it can result in an "infinite" disk-filling loop. [bug present since "the beginning"]'; so it is undoubtedly their bug.
Hi, thanks for reporting this bug. Assigned to the package maintainer.
Keywords: (none) => TriagedAssignee: bugsquad => boklmSource RPM: (none) => grep
I opened a bug upstream : https://savannah.gnu.org/bugs/?34917
This is now fixed upstream : http://git.savannah.gnu.org/cgit/grep.git/commit/?id=979592944f06bddb108458073239d2ff52d2c475
Hi, This bug was filed against cauldron, but we do not have cauldron at the moment. Please report whether this bug is still valid for Mageia 2. Thanks :) Cheers, marja
Keywords: (none) => NEEDINFO
Works fine here with grep-2.11-2.mga2 Testcase: grep -q a test > test returns nothing.
CC: (none) => yurchor
closing then
Keywords: NEEDINFO => UPSTREAMStatus: NEW => RESOLVEDResolution: (none) => FIXED