Re: tr: trying to find the right incantation of a character class...

2017-08-30 Thread Cristian Ionescu-Idbohrn
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?

Re: tr: trying to find the right incantation of a character class...

2017-08-29 Thread Olivier Brunel
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

tr: trying to find the right incantation of a character class...

2017-08-29 Thread Cristian Ionescu-Idbohrn
...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: