[grep THIS foo.txt > THIS.txt] gives an Error in Makefile, not in bash, when grep output is empty
Makefile is as follows :
THIS.txt : foo.txt
     grep THIS foo.txt > $@

When grep output is empty (no THIS in foo.txt), make gives an error message, bash does not :

> make
make:*** [THIS.txt] Error 1

> grep THIS foo.txt > THIS.txt
>

>grep THIS foo.txt 2>&1
>

How comes ? How should I modify my makefile to avoid an Error msg when grep output is empty ?
[grep THIS foo.txt > THIS.txt] gives an Error in Makefile, not in bash, when grep output is empty
===

Makefile is as follows :
THIS.txt : foo.txt
     grep THIS foo.txt > $@

When grep output is empty (no THIS in foo.txt), make gives an error message, bash does not :

> make
make:*** [THIS.txt] Error 1

> grep THIS foo.txt > THIS.txt
>

>grep THIS foo.txt 2>&1
>

How comes ? How should I modify my makefile to avoid an Error msg when grep output is empty ?