Red Hat Bugzilla – Bug 15814
bash - internal printf no longer ignores options
Last modified: 2008-05-01 11:37:57 EDT
RedHat Pinstripe Beta-5
From a bash shell, type:
printf "-w 123\n"
and you get:
bash: printf: illegal option: -w
printf: usage: printf format [arguments]
Now with ash, or bash on RedHat 6.2 and earlier, or if you use
/usr/bin/printf, you would get:
The bash man-page, printf section, still does not indicate that there are
_any_ valid options - so why does it attempt to process them?
I am logging this as a serious defect because it breaks
backwards-compatability. There may be a number of customer-written scripts
which suddenly start to fail if they upgrade to RedHat 7.0.
POSIX compliance in bash 2.x - anything starting with "-" is an argument.
If you need the old behavior, use /usr/bin/printf.