[bug] ash: 'string length'

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Sat Oct 3 17:11:59 UTC 2009


On Fri, 2 Oct 2009, Cristian Ionescu-Idbohrn wrote:

> Consider this script:
>
> ---8<---
> #!/bin/sh
>
> set -e
> #set -x
>
> echo "1. \$1='$1', size \${#\$1}=${#$1}" >&2
> echo "2. \$2='$2', size \${#\$2}=${#$2}" >&2
> echo "3. \$3='$3', size \${#\$3}=${#$3}" >&2
>
> echo "4. \$1='$1', size \${#1}=${#1}" >&2
> --->8---
>
> Expecting error 'bad substitution' on 1., 2. and 3.  I get:
>
> 	size=5
>
> instead, no error.

Would the attached patch be an apprpriate bugfix for the above?


Cheers,

-- 
Cristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ash-bad-substitution.patch
Type: text/x-diff
Size: 322 bytes
Desc: 
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20091003/09f6b278/attachment.bin>


More information about the busybox mailing list