Bob Proulx writes:
> To be totally honest I thought echo was already very well documented.
> And I thought we already were strongly recommending people to use
> printf for arbitrary data. Therefore honestly I thought by agreeing I
> thought we were done.
I do not agree. The only recommendation
Florent Flament wrote:
> Bob Proulx writes:
> >> In which case, thoroughly documenting the edge cases of the 'echo'
> >> command and inviting programmers to use 'printf' instead on its
> >> manpage (I know 'printf' is mentioned on the coreutils info page,
> >> but it's one additional level of
Bob Proulx writes:
> The "-n" in the "string" position is listed specifically as an
> exception to the general rule previously stated. Basically an
> interpretation might be don't implement getopt option processing in
> general but look specifically at the first argument for this specific
>
Florent Flament wrote:
> Bob Proulx wrote:
> However, I believe that the use of "shall not" makes the POSIX echo
> definition ambiguous:
>
> The echo utility shall not recognize the "--" argument in the
> manner specified by Guideline 10 of XBD Utility Syntax Guidelines;
> "--" shall
On Tue, 2021-10-19 at 01:06 -0600, Bob Proulx wrote:
> Florent Flament wrote:
> > Out of curiosity, would it possible to have the `echo` command
> > output the string "-n" ?
> >
> > ```
> > $ POSIXLY_CORRECT=1 /bin/echo -n
> > ```
>
> But the standards do actually mention -n. The behavior you see
Florent Flament wrote:
> Out of curiosity, would it possible to have the `echo` command output
> the string "-n" ?
>
> ```
> $ POSIXLY_CORRECT=1 /bin/echo -n
> ```
But the standards do actually mention -n. The behavior you see with
POSIXLY_CORRECT=1 is conforming behavior.
On Fri, 2021-10-15 at 23:37 +0100, Philip Rowlands wrote:
> On Fri, 15 Oct 2021, at 18:42, Roger Pack wrote:
> > It came to my attention recently that it seems not possible to
> > "echo" the
> > string "-e"
> > $ echo "-e"
>
> Nitpick: the double quotes aren't doing anything here.
>
> > Perhaps
I just use printf "%s\n" "-e"-e
Regards
Leslie
Leslie Satenstein
Montréal Québec, Canada
On Friday, October 15, 2021, 06:38:19 p.m. GMT-4, Philip Rowlands
wrote:
On Fri, 15 Oct 2021, at 18:42, Roger Pack wrote:
> It came to my attention recently that it seems not possible to
On 15/10/2021 23:37, Philip Rowlands wrote:
On Fri, 15 Oct 2021, at 18:42, Roger Pack wrote:
It came to my attention recently that it seems not possible to "echo" the
string "-e"
$ echo "-e"
Nitpick: the double quotes aren't doing anything here.
Perhaps echo could add a "--" style param
On Fri, 15 Oct 2021, at 18:42, Roger Pack wrote:
> It came to my attention recently that it seems not possible to "echo" the
> string "-e"
> $ echo "-e"
Nitpick: the double quotes aren't doing anything here.
> Perhaps echo could add a "--" style param like
>
> $ echo -- -e
These are both
10 matches
Mail list logo