Re: /usr/bin/printf(1) not POSIX.2 compliant

2019-07-21 Thread tlaronde
On Sun, Jul 21, 2019 at 10:31:18PM +0700, Robert Elz wrote: > Date:Sun, 21 Jul 2019 16:15:05 +0200 > From:tlaro...@polynum.com > Message-ID: <20190721141505.ga4...@polynum.com> > > | For safety, in my scripts, I simply circumvent by a > | leading "%c" or "\055" >

Re: /usr/bin/printf(1) not POSIX.2 compliant

2019-07-21 Thread Robert Elz
Date:Sun, 21 Jul 2019 16:15:05 +0200 From:tlaro...@polynum.com Message-ID: <20190721141505.ga4...@polynum.com> | For safety, in my scripts, I simply circumvent by a | leading "%c" or "\055" I'd suggest %s (with a '' arg) (even %.0s to make it blatant) as a clearer

Re: /usr/bin/printf(1) not POSIX.2 compliant

2019-07-21 Thread tlaronde
On Sun, Jul 21, 2019 at 09:08:03PM +0700, Robert Elz wrote: > Date:Sun, 21 Jul 2019 10:53:35 +0200 > From:tlaro...@polynum.com > Message-ID: <20190721085335.ga...@polynum.com> > > | Am I correct? Is it worth a PR? > > I believe you are correct, though this is a comm

Re: /usr/bin/printf(1) not POSIX.2 compliant

2019-07-21 Thread Robert Elz
Date:Sun, 21 Jul 2019 10:53:35 +0200 From:tlaro...@polynum.com Message-ID: <20190721085335.ga...@polynum.com> | Am I correct? Is it worth a PR? I believe you are correct, though this is a common problem (one shared by dash and bash which makes it very common out the

/usr/bin/printf(1) not POSIX.2 compliant

2019-07-21 Thread tlaronde
Hello, If I'm not mistaken, /usr/bin/printf(1) is not POSIX.2 compliant: $ /usr/bin/printf "---\n" printf: unknown option -- - Usage: printf format [arg ...] The specification says that printf has no options and we invoke getopt(3). Every first argument, even looking like options, is a valid for