[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: echo --
From: |
Florent Flament |
Subject: |
Re: feature request: echo -- |
Date: |
Sun, 17 Oct 2021 00:25:40 +0200 |
User-agent: |
Evolution 3.36.5-0ubuntu1 |
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 echo could add a "--" style param like
> >
> > $ echo -- -e
>
> These are both covered by the documentation
> https://www.gnu.org/software/coreutils/manual/html_node/echo-invocation.html
>
> "... the normally-special argument ‘--’ has no special meaning and is
> treated like any other string."
>
> "If the POSIXLY_CORRECT environment variable is set, then when echo’s
> first argument is not -n it outputs option-like arguments instead of
> treating them as options."
>
> Thus the way to make this work is:
>
> $ POSIXLY_CORRECT=1 /bin/echo -e
> -e
>
>
> Cheers,
> Phil
Hi,
Out of curiosity, would it possible to have the `echo` command output
the string "-n" ?
```
$ POSIXLY_CORRECT=1 /bin/echo -n
```
Regards,
Florent Flament
- feature request: echo --, Roger Pack, 2021/10/15
- Re: feature request: echo --, Philip Rowlands, 2021/10/15
- Re: feature request: echo --, Pádraig Brady, 2021/10/15
- Re: feature request: echo --, Leslie S Satenstein, 2021/10/15
- Re: feature request: echo --,
Florent Flament <=
- Re: feature request: echo --, Bob Proulx, 2021/10/19
- Re: feature request: echo --, Florent Flament, 2021/10/19
- Re: feature request: echo --, Bob Proulx, 2021/10/19
- Re: feature request: echo --, Florent Flament, 2021/10/20
- Re: feature request: echo --, Bob Proulx, 2021/10/21
- Re: feature request: echo --, Florent Flament, 2021/10/21