Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: probably a bug in 'tr' command
- X-seq: zsh-workers 44116
- From: dana <dana@xxxxxxx>
- To: Андрей Варяница <asvs07@xxxxxxxxx>
- Subject: Re: probably a bug in 'tr' command
- Date: Tue, 12 Mar 2019 00:23:35 -0500
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1TLvzJ8MH6vX+rQZRAqk6/IvUFxpjIo+9Amd9SgEYHw=; b=RN5MoamU77vpeSRCfVb/2kmHDAA6uoVUDZZeTad08eIh0iobCGH689bi/ida3uVMRx pDxGxIT2b+pH968p4r+IpdUjG61NbgRaAMnwQtUg6NNOTPqEbQGyy+vfJUmkwBjx8mDI CXFJaGpfWP6ilCPVS5Lg6ukZX1MxFKrCTq4mp4qFL6sAEI2I0J9pJNVubg5bX0s6v0oX YhvOEw0yzakJlFKrF3ZDD0dpbs+VcHuevuLaOLwb07m7gHJ18/ageRE3WZXKv39amduP NU7P5ZYMzu5mGfR7BD2oplE8rF+CUK6nVmFo28lVnY15UPGBK2XqeHG7+omeuYCaGh0e PBaA==
- In-reply-to: <7bdcddb8-75b1-3dcf-d5bb-b538448fde4b@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <7bdcddb8-75b1-3dcf-d5bb-b538448fde4b@gmail.com>
On 12 Mar 2019, at 02:06, Андрей Варяница <asvs07@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author