| Deutsch English Français Italiano |
|
<20250412105946.299@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.unix.shell Subject: Re: GNU grep and files with nulls Date: Sat, 12 Apr 2025 18:03:40 -0000 (UTC) Organization: A noiseless patient Spider Lines: 28 Message-ID: <20250412105946.299@kylheku.com> References: <vtdvbh$1k2sl$1@news.xmission.com> <vte8qv$10m5h$1@dont-email.me> Injection-Date: Sat, 12 Apr 2025 20:03:40 +0200 (CEST) Injection-Info: dont-email.me; posting-host="9f75a0c1dafb617c14742e67f05c9d3f"; logging-data="1106158"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DFGiXchmqT7owpBOqixQ7GYPpTi4CXYQ=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:SAR7rPwEzNfOIW9QDMgi/wxmZXk= 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