Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1011759
| From | Melvin Vermeeren <vermeeren@vermwa.re> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#961740: printf attempts to parse options and fails to print --help |
| Date | 2020-05-28 17:30 +0200 |
| Message-ID | <AbsDM-5yg-11@gated-at.bofh.it> (permalink) |
| Organization | vermware |
[Multipart message — attachments visible in raw view] - view raw
Package: coreutils Version: 8.30-3 Hi, POSIX specifies printf has no options, meaning this should print "--help". Arguments parsing must simply not be attempted at all in order to be compliant as far as I know. $ /usr/bin/printf --help Usage: /usr/bin/printf FORMAT [ARGUMENT]... or: /usr/bin/printf OPTION ... From https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html: > SYNOPSIS > > printf format [argument...] > > ... > > OPTIONS > > None. Bash also does not handle this correctly. However bash is not POSIX sh, hence it is not a bug. (It appears bash some some "printf -v var" extension.) I also tested zsh, which appears to be fully compliant. Thanks, -- Melvin Vermeeren
Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread
Bug#961740: printf attempts to parse options and fails to print --help Melvin Vermeeren <vermeeren@vermwa.re> - 2020-05-28 17:30 +0200
Bug#961740: printf attempts to parse options and fails to print --help Michael Stone <mstone@debian.org> - 2020-05-28 18:20 +0200
Bug#961740: printf attempts to parse options and fails to print --help Jakub Wilk <jwilk@jwilk.net> - 2020-05-29 19:40 +0200
Bug#961740: printf attempts to parse options and fails to print --help Melvin Vermeeren <vermeeren@vermwa.re> - 2020-05-29 20:20 +0200
csiph-web