On Mon, Mar 24 at 10:33, Dominik Vogt wrote:
> On Sun, Mar 23, 2003 at 06:30:32PM -0800, Elliot Sowadsky wrote:
>> 
>> 2.5.6 on solaris 5.8
>> 
>> piperead example in faq gives shell syntax error
>> 
>>     AddToFunc   CenterWindow
>>     + I ThisWindow Piperead "echo Move \
>>       $(( $[vp.width]/2-$[w.width]/2 ))p \
>>       $(( $[vp.height]/2-$[w.height]/2 ))p"
>> 
>> sh complains about missing (
>> 
>> Actually i'm trying to calculate which horizontal pager window i'm in
>> when i click on it.
> 
> Look like the solaris /bin/sh does not know the "$(( ... ))" syntax.  

Checked in 5.9 and it really doesn't.

> What is the most portable syntax for arithmetic expansion?

Probably using (external) expr, but AFAIR the $(( )) arithmetic
expansion should be supported in all POSIX compliant shells.

Regards,

-- 
Marcin Pawlik
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to