bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #13303] find should filter out non-printable characters if outp


From: James Youngman
Subject: Re: [bug #13303] find should filter out non-printable characters if outputting to tty
Date: Sun, 5 Jun 2005 15:07:24 +0100
User-agent: Mutt/1.3.28i

On Sun, Jun 05, 2005 at 12:02:59PM +0000, Andreas Metzler wrote:

> Afaict dumping non printable characters to the terminal usually is not wanted
> and should not be default.
> 
> Posix says:
> -print
>     The primary shall always evaluate as true; it shall cause 
>     the current pathname to be written to standard output.
> 
> so by filtering out these characters (e.g by replacing them with
> questionmarks or their escapecodes) we would not be following posix to the
> letter. But do you want to be _that_ strict?

I'm tempted to adopt the same approach as "ls" does in coreutils,
which is to print a "?" for nongraphic characters if stdout is a tty.

For find this, this might also logically mean changing -fprintf if the
target is a terminal, too.  

Do other list members have opinions or thoughts?

James.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]