On Mon, May 1, 2017 at 3:38 PM, ziyunfei <446240...@qq.com> wrote:
> I have the same need as
> http://stackoverflow.com/questions/14631794/check-if-file-contains-some-text-not-regex-in-unix#comment20438757_14631832.
>
> $ cat file
> foo
> bar
>
> $ echo "$fixed_string"
> bar
> foo
>
> $ grep -Fzq
I have the same need as
http://stackoverflow.com/questions/14631794/check-if-file-contains-some-text-not-regex-in-unix#comment20438757_14631832.
$ cat file
foo
bar
$ echo "$fixed_string"
bar
foo
$ grep -Fzq "$fixed_string" file && echo "Matched" || echo "Not matched"
Matched # false positive,