[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Can't get "grep -F" to work like real grep
From:       Quentin Rameau <quinq () fifth ! space>
Date:       2019-12-10 13:29:32
Message-ID: 20191210142932.4f847843 () fifth ! space
[Download RAW message or body]

> Thanks for the comment, but "grep" without the "-F" works.
> That, as a regex match, is somewhat harder and more fragile with binary data 
> than a simple fixed-string search!

I'm not sure what you're trying to say here.

You asked for some help spotting the problem and I explained to you
that you can't expect grep to work on binary data, which you do in that
case, and which is the problem.

Now, it may work unexpectedly on some cases, like passing your pattern
as a BRE on this specific file you're testing with, but you can't rely
on that behaviour.

What you could do though (just one suggestion over many possibilities)
is to use strings(1) over that regular file and filter its output with
a fixed pattern using grep -F.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic