Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
probably a bug in 'tr' command
- X-seq: zsh-workers 44115
- From: Андрей Варяница <asvs07@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: probably a bug in 'tr' command
- Date: Tue, 12 Mar 2019 11:06:29 +0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=dMOPgwg/H6D3AlyPftdl6kQh5UBqPeAY6OmEakVd29w=; b=tSH/R+c437ISbUPg4HKKdyB9xS7Ln/UDbhyIB2vfiVcGrWSoSJrHupRkDPff2jA88Y T3nAmvhDWmi93/xN8+raaxm/NHzUxbbjdcqRs8mwtJUVhFm5GZStXSFQHUZRW/HrHeg8 jipvfom7ZcHoU2pJFBwIoQdgpXhaw8UFexnY1n7yZRt+N5nar1H5F1FQtqa1+rBihsc5 TUVVHMOb7OuWMsFMSklxCPUrBxOU+qjO1YpFj6WClIpcIyuOL+F2wfxcqYPIW2Yfm0EA g9V4dQR6niS60CaiKR4U2QUv3Y4WJPmkFFrlRGUny/ysTutHolOpyjdaUCIyFKu5GMx9 vpvg==
- 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
When I run the following command in zsh I get empty result.
echo '-' | tr -dc '[0-9]-'
Expected result is single dash as output.
When I run it in bash or sh, then result is single dash as expected.
% zsh --version
OUTPUT> zsh 5.7.1 (x86_64-pc-linux-gnu)
% tr --version
OUTPUT> tr (GNU coreutils) 8.30
OUTPUT> Copyright (C) 2018 Free Software Foundation, Inc.
OUTPUT> License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
OUTPUT> This is free software: you are free to change and redistribute it.
OUTPUT> There is NO WARRANTY, to the extent permitted by law.
OUTPUT>
OUTPUT> Written by Jim Meyering.
I will also say, that I poorly familiar with manuals of zsh and even tr.
So maybe this behavior is not a bug.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author