[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62230] Doc/behaviour mismatch for -printf %INVALID
From: |
raf |
Subject: |
[bug #62230] Doc/behaviour mismatch for -printf %INVALID |
Date: |
Tue, 29 Mar 2022 05:17:08 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62230>
Summary: Doc/behaviour mismatch for -printf %INVALID
Project: findutils
Submitted by: raf
Submitted on: Tue 29 Mar 2022 09:17:07 AM UTC
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: raf
Originator Email:
Open/Closed: Open
Release: 4.8.0
Discussion Lock: Any
Fixed Release: None
_______________________________________________________
Details:
The find(1) manual entry says (in relation to -printf):
"A `%' character followed by any other character is discarded, but the other
character is printed"
But that's not the case. find . -printf '%Q\n' prints "%Q" for each file.
According to the documentation, it should print "Q".
While the behaviour described in the documentation is arguably better than the
actual documentation (not as good as an error but still better), it would
probably be best to change the documentation to match the current behaviour.
A separate (not technically incorrect) point:
It also says:
"A `%' at the end of the format argument causes undefined behaviour since
there is no following character. In some locales, it may hide your door
keys, while in others it may remove the final page from the novel you are
reading."
When in reality, it just detects the situation and terminates with this
error:
find: error: % at end of format string
While technically OK, the documentation could just tell the truth and say that
it is an error. I'm assuming that there aren't any actual locales where it
decides to not be an error. :-)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62230>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62230] Doc/behaviour mismatch for -printf %INVALID,
raf <=