bug-coreutils
[Top][All Lists]
Advanced

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

stat: possible feature retraction: speak now or hold your peace


From: Jim Meyering
Subject: stat: possible feature retraction: speak now or hold your peace
Date: Fri, 25 Nov 2005 10:18:25 +0100

[FYI, I posted a similar message just before making the incompatible
 change, but no one objected. ]

Due to complaints that the new (5.93) stat has broken some Debian scripts,
I'm thinking of making the following changes in coreutils-5.94 and
on the trunk:

    stat's --format=FMT option now works the way it did before 5.3.0:
    FMT is automatically newline terminated.  The first stable release
    containing this change was 5.92.

    stat accepts the new option --printf=FMT, where FMT is *not*
    automatically newline terminated.

    stat: backslash escapes are interpreted in a format string specified
    via --format=FMT or --printf=FMT.

I have mixed feelings about doing this.  On one hand, the change has
been in test releases for a pretty long time.  On the other, it's been
in stable releases for only a month.

If you know of scripts that rely on the current (5.3.0-5.93) behavior
and feel strongly that we should retain the current behavior, speak up now.

History:

  pre-5.3.0 (no newline in format, newline(s) in output)

    $ stat --format=%i / /
    2
    2

  5.3.0-5.93 (no newline in format, no newline in output)

    $ stat --format=%i / /; echo
    22
    $

You *can* use the newer version of stat to get the
same behavior as before, e.g., with a Bourne shell:

    $ nl='
    '
    $ stat --format=%i"$nl" / /
    2
    2




reply via email to

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