2019-07-22 16:16:43 -0600, Assaf Gordon:
[...]
> or the more robust:
>
>printf "%s" "$variable_i'm_looking_in" | grep -q "$thing_i'm_looking_for"
[...]
Preferably (POSIXly):
printf "%s\n" "$variable_i'm_looking_in" | grep -qe "$thing_i'm_looking_for"
Or
printf "%s\n" "$variable_i'm_looking
tag 36764 notabug
close 36764
stop
Hello,
(answering out-of-order)
On Mon, Jul 22, 2019 at 06:12:10PM +0100, Lewis Farnworth wrote:
> To reiterate:
>
> if grep -q "thing_i'm_looking_for" $variable_i'm_looking_in; then
>
> doesn't work, on CentOS 7 or Debian 9.
This is incorrect usage, and ha
Hello,
Never posted a bug report before but I'm certain that the -q flag for grep
is broken.
I previously had a working script, that used -q in this context here:
if grep -q "RewriteCond %{HTTP_REFERER} !.*example.com*" $line; then
---