severity 16782 wishlist retitle 16782 date: reject invalid %[X] format characters stop
(triaging old bugs) Hello, On 17/02/14 10:42 AM, f...@fuz.su wrote:
Consider the following set of date invocations: $ date +%05 00%05 $ date +%Y%#05 20140%#05 $ date +x%7 x %7 $ date "+%7 xyz" %7 xyz $ date "+%7q xyz" %7q xyz GNU date behaves strangely when given an invalid formatting string. GNU date does not inform the user about the invalid formatting string; instead it outputs padding as if the flags and field-width
It seems your message was never replied to. Sorry about that. Indeed, this would be a nice improvement, contrast: $ printf "+%7 xyz" -bash: printf: ` ': invalid format character $ /src/printf "+%7 xyz" +./src/printf: %7 : invalid conversion specification $ ./src/printf "+%7q xyz" +./src/printf: %7q: invalid conversion specification Marking this as a "wishlist" item. -assaf