GNU bug report logs -
#23422
stat -c %N returns strange results for file names including <TAB>
Previous Next
Full log
Message #32 received at 23422 <at> debbugs.gnu.org (full text, mbox):
On Tuesday 03 May 2016, Paul Eggert wrote:
> On 05/02/2016 03:19 PM, Ruediger Meier wrote:
> > This new quoting style default is just ugly, unreadable and
> > annoying.
>
> If you can think of an unambiguous output style that is beautiful,
> readable, and pleasant, please let us know.
Looking again at the OP's example
'foo'$'\t''bar'
it's not so difficult to imagine a better quoting style. It would be
more difficult to make it more ugly ... Nobody would ever type this
string like this, mixing and changing the quotes a few times within one
string. Moreover it's unusable for most use cases (except shell
copy/paste).
The old behavior 'foo\tbar' seems like C style which was already nice to
read and also unambiguous I guess. Adding a $ in front of that C string
should work in shell too, or not?
Anyways the incompatible change is IMO not acceptable. %N is probably
most likely used in scripts which rely on the known style. One argument
to defend the ugly quoting style change in ls(1) was that it's usually
only used interactively. This is not the case for stat -c.
cu,
Rudi
This bug report was last modified 8 years and 255 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.