zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: "Андрей Варяница" <asvs07@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: probably a bug in 'tr' command
Date: Tue, 12 Mar 2019 00:23:35 -0500	[thread overview]
Message-ID: <5F2C93C6-BA3B-416F-BAEC-58EB55C57C7F@dana.is> (raw)
In-Reply-To: <7bdcddb8-75b1-3dcf-d5bb-b538448fde4b@gmail.com>

On 12 Mar 2019, at 02:06, Андрей Варяница <asvs07@gmail.com> wrote:
>When I run the following command in zsh I get empty result.
>
>echo '-' | tr -dc '[0-9]-'
>
>Expected result is single dash as output.

From the manual section on the echo built-in:

>Note that for standards compliance a double dash does not terminate option
>processing; instead, it is printed directly. However, a single dash does
>terminate option processing, so the first dash, possibly following options,
>is not printed, but everything following it is printed as an argument. The
>single dash behaviour is different from other shells. For a more portable way
>of printing text, see printf, and for a more controllable way of printing
>text within zsh, see print.

dana


  reply	other threads:[~2019-03-12  5:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  7:06 Андрей Варяница
2019-03-12  5:23 ` dana [this message]
2019-03-12  7:41   ` Андрей Варяница

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5F2C93C6-BA3B-416F-BAEC-58EB55C57C7F@dana.is \
    --to=dana@dana.is \
    --cc=asvs07@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).