[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reverting `stat --format=FMT'
From: |
Paul Eggert |
Subject: |
Re: reverting `stat --format=FMT' |
Date: |
Thu, 15 Dec 2005 10:02:57 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> As planned, here's the change to revert stat --format=FMT to
> its previous behavior. Note that with this change, backslash
> escapes in a --format-specified format string are *not* interpreted.
Looks good. A couple of minor comments.
Unless I read the code wrong, that patch mishandles the case
where the printf format string ends in backslash, e.g., --printf='\'.
This proposal supports \" but not \' or \? (meaning ", ', ?,
respectively, the same as C). I just checked Bash 3.1, and its printf
supports \', \", and \?. Perhaps coreutils printf formats should do
the same, for consistency. Bash printf also supports \e (ESC) and \E
(ESC); that's not in C, but it might be useful to add that as well,
for consistency. This would apply both to stat and to printf.