Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 1999 13:14:17 -0400 (EDT)
From:      Mikhail Teterin <mi@aldan.algebra.com>
To:        gnats-admin@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject:   Re: bin/12137: something wrong with shell -- functions with arithm expressions
Message-ID:  <199906111714.NAA58200@misha.cisco.com>
In-Reply-To: <199906111710.KAA90425@freefall.freebsd.org> from "gnats-admin@FreeBSD.org" at "Jun 11, 1999 10:10:01 am"

next in thread | previous in thread | raw e-mail | index | archive | help
The ``-'' character is also causing troubles. The script:
length () {
        echo $((0+${#1}))
}

length "abc (def [xyz])"
length "abc (def (xyz))"
length "abc (def -xyz-)"

Produces:
16
15
17

Again, bash and ksh print out 15 for all of the strings...

	-mi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906111714.NAA58200>