tr breakage
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Sun May 10 22:28:52 UTC 2009
On Mon, 11 May 2009, Denys Vlasenko wrote:
> On Tuesday 05 May 2009 15:46, Cristian Ionescu-Idbohrn wrote:
> > This script snippet, when run on host with coreutils tr:
> >
> > #bb=./busybox
> > echo \"$(echo "$foo" | $bb tr -d '[0-9a-zA-Z]')\"
> > echo \"$(echo "$foo" | $bb tr -d '0-9a-zA-Z')\"
> > echo \"$(echo "$foo" | $bb tr -d "[:alnum:]")\"
> >
> > returns the expected result: " ".
>
> My telepathic powers say you set foo="abc 123"
You gor special talents :) And it's, of course, stupid of me to nor
reveal foo :(
> > But running the same with bb tr
> > (uncommented bb):
> >
> > BusyBox v1.13.4 (2009-05-05 15:10:24 CEST) multi-call binary
> >
> > returns:
> >
> > ""
> > " "
> > "bc 123"
> >
> > Does anyone else see this behaviour?
> > tr from trunk bb gets things right.
>
> Yes, no surprise here, it was fixed in 1.14.0:
>
> tr: fix overflow in expand and complement, fix stop after [:class:], fix
> handling of ranges and [x]'s
Right. But wouldn't it be apprpriate with a patch in:
http://busybox.net/downloads/fixes-1.13.4/
too? IMO, it's a significant bugfix. Wouldn't you agree?
Cheers,
--
Cristian
More information about the busybox
mailing list