GNU bug report logs -
#28306
grep: option to filter non-printable characters from contents
Previous Next
Full log
View this message in rfc822 format
Dear grep upstream authors,
I'd like to forward this bug reported to debian
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498336
On Tue, 9 Sep 2008 11:07:33 +0200 Vincent Lefevre <vincent <at> vinc17.org> wrote:
…
>
> grep should have an option to filter non-printable characters from
> the contents (file contents, but also filenames -- see bug #42630)
> *before coloring*. The values could be "never", "always" and "auto",
> like with --color.
>
> Such an option would be useful because:
>
> 1. The option --binary-files is a heuristic only; the user may want
> to have more information on binary files anyway.
>
> 2. It is not even possible to write a wrapper script when coloring is
> used, because after coloring, it is not possible (or at least very
> difficult) to do the difference between escape sequences from grep
> and those from the original contents.
>
> Such non-printable characters could be either replaced by some
> locale-specific replacement character or transcoded.
>
> I wonder whether filtering should be the default when the output
> is connected to a terminal (and when POSIXLY_CORRECT is not set).
> It would not be worse than the default --binary-files=binary.
…
This option could be also useful to filter undesirable behaviors, such
as ringing the bell terminal (from stdin in this case):
printf '\a'x | grep x
What's your position on this?
Thanks,
-- Santiago
PS. As Vincent Lefevre says, this bug relates to filtering non-printable
characters from filenames:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=42630
This bug report was last modified 5 years and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.