Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

probably a bug in 'tr' command



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