standards/52972: /bin/sh arithmetic not POSIX compliant

Wartan Hachaturow wart at
Mon Jun 23 04:50:12 PDT 2003

The following reply was made to PR standards/52972; it has been noted by GNATS.

From: Wartan Hachaturow <wart at>
To: Dag-Erling Sm?rgrav <des at>
Cc: freebsd-gnats-submit at
Subject: Re: standards/52972: /bin/sh arithmetic not POSIX compliant
Date: Mon, 23 Jun 2003 15:40:24 +0400

 On Mon, Jun 23, 2003 at 08:32:55AM +0200, Dag-Erling Sm?rgrav wrote:
 > This *should* work, but doesn't.
 I've filed just the same bug against Debian package of ash. This is the
 answer I got from Herbert Xu, also an upstream of what's called "dash",
 Debian fork of ash shell (it has just the same behaviour as FreeBSD's 
 > Package: ash
 > Version: 0.4.17
 > Severity: normal
 > Tags: upstream
 That's me.
 > According to SUSv3, shell should implement integer variables in 
 > arithmetic evaluation:
 You're mistaken.  SUSv3 only requires constant arithmetic.  Variables
 must be expanded before reaching arithmetic expansion.
 Read C.2.6.4 for a detailed explanation.
 > P.S. I'll try to make a patch fixing this bug in near future.
 Please use bash/ksh instead.
 .. and he has closed the bug. Now I am really lost -- where is the
 Regards, Wartan.

More information about the freebsd-standards mailing list