From Newsgroup: comp.unix.shell
On 2025-04-12, John McCue <
jmccue@magnetar.jmcunx.com> wrote:
Kenny McCormack <gazelle@shell.xmission.com> wrote:
So, I have a file that contains a line like:
foo.bar.bletch.one.two
where the dots represent null (\0) characters.
I want to be able to grep this line, using this command:
grep foo.bar.bletch.one.two file
Did you try using argument '--binary-files=' ?
Detail in the GNU grep man page :)
I just remember the -a shortcut, which is the same
as --binary-files=text. All the other --binary-files
options are about /not/ grepping through binary files,
so that useful one gets the one letter shortcut.
We can probably mnemonize it as "all": "grep
through all the darned files, including binaries".
--
TXR Programming Language:
http://nongnu.org/txr
Cygnal: Cygwin Native Application Library:
http://kylheku.com/cygnal
Mastodon: @
Kazinator@mstdn.ca
--- Synchronet 3.21b-Linux NewsLink 1.2