grep for ascii nul

Victor Sudakov vas at sibptus.ru
Fri Nov 1 14:59:04 UTC 2019


Michael Schuster wrote:
> https://stackoverflow.com/questions/4180081/binary-grep-on-linux/4180531#4180531
> 
> Does that help?

Actually, Kurt's small program has been much more helpful.

I'm in fact surprised that the FreeBSD base system does not contain a
binary-capable grep.

I've found out that pcregrep from devel/pcre can catch it with this syntax: 
pcregrep '\x0' test.txt

but it does not output just the filename, even with -l

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet http://vas.tomsk.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20191101/41d2ad60/attachment.sig>


More information about the freebsd-questions mailing list