On Tue, 29 Aug 2017, Olivier Brunel wrote:
> On Tue, 29 Aug 2017 19:23:39 +0200 (CEST)
> Cristian Ionescu-Idbohrn wrote:
>
> > ...to do this:
> >
> > $ echo 'hello world-1' | tr -d '[ -]'
> >
> > that is, remove all SPACES (0x20) and dashes (0x2D) in input?
On Tue, 29 Aug 2017 19:23:39 +0200 (CEST)
Cristian Ionescu-Idbohrn wrote:
> ...to do this:
>
> $ echo 'hello world-1' | tr -d '[ -]'
>
> that is, remove all SPACES (0x20) and dashes (0x2D) in input? I get
echo 'hello world-1' | tr -d -- ' -'
> mixed
...to do this:
$ echo 'hello world-1' | tr -d '[ -]'
that is, remove all SPACES (0x20) and dashes (0x2D) in input? I get
mixed results with both various versions of busybox but also with the
coreutils `tr' and the characters order placed in the character class.
`man 7 regex' is telling us: