Date: Thu, 10 Jun 2010 12:15:21 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: RW <rwmaillists@googlemail.com> Cc: freebsd-questions@freebsd.org Subject: Re: sh ++/-- operators Message-ID: <20100610171521.GA5615@dan.emsphone.com> In-Reply-To: <20100610171854.69246a78@gumby.homeunix.com> References: <20100610171854.69246a78@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jun 10), RW said: > FreeBSD's sh (in 8.0) doesn't seem to support the ++ or -- arithmetic > operators > > $ echo "$((n++))" > arithmetic expression: syntax error: "n++" > > Am I wrong in thinking these are POSIX operators? It seems odd if they > were simply left-out.. Easy enough to check: http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04 * The sizeof() operator and the prefix and postfix "++" and "--" operators are not required. Patches welcome to implement them if you want them :) -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100610171521.GA5615>