GNU bug report logs - #7568
stat 'i\i' shows 'i\\i'

Previous Next

Package: coreutils;

Reported by: jidanni <at> jidanni.org

Date: Mon, 6 Dec 2010 02:34:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7568 in the body.
You can then email your comments to 7568 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7568; Package coreutils. (Mon, 06 Dec 2010 02:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 06 Dec 2010 02:34:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-coreutils <at> gnu.org
Subject: stat 'i\i' shows 'i\\i'
Date: Mon, 06 Dec 2010 10:38:58 +0800
stat 'i\i' shows 'i\\i'.
Backspaces in filenames are doubled.
stat (GNU coreutils) 8.5




Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Mon, 06 Dec 2010 08:22:02 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Mon, 06 Dec 2010 08:22:02 GMT) Full text and rfc822 format available.

Message #10 received at 7568-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: jidanni <at> jidanni.org
Cc: 7568-done <at> debbugs.gnu.org
Subject: Re: bug#7568: stat 'i\i' shows 'i\\i'
Date: Mon, 06 Dec 2010 09:27:14 +0100
jidanni <at> jidanni.org wrote:
> stat 'i\i' shows 'i\\i'.
> Backspaces in filenames are doubled.
> stat (GNU coreutils) 8.5

Thanks for the report, but that's a feature, since backslash
is used to denote e.g., newline (\n), backspace (\b), etc. in
a quoted name:

    $ ./stat -c %N 'a^Hb'
    `a\bb'

If you don't want the quoting, you can use your own format string
with %n in place of %N:

     * %n - File name
     * %N - Quoted file name with dereference if symbolic link




Message #11 received at 7568-done <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: jim <at> meyering.net
Cc: 7568-done <at> debbugs.gnu.org
Subject: Re: bug#7568: stat 'i\i' shows 'i\\i'
Date: Mon, 06 Dec 2010 19:02:32 +0800
>>>>> "JM" == Jim Meyering <jim <at> meyering.net> writes:
JM> Thanks for the report, but that's a feature...

OK, but the man page or info page should say
* what the default is. I.e., what would the user do if he wanted to make
the same output as
$ stat myfile
but instead the hard way, using
$ stat --format '....
....
...' myfile. And give the \n compact version too...

And in showing this, you would also tip the user off that you are using
%N.

And when discussing %N, give a complete list of what all the \ sequences
are. And mention %n gives them raw if that is what one wants.

Currently this is all not documented.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Jan 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.