Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: offset calendar days



>> Zefram (Z) wrote on Sat, 30 Sep 1995 06:17:42 +0100 (BST):
>> charney$ echo $ZSH_VERSION
>> 2.6-beta10-hzoli10.2
>> charney$ TZ=GMT-$((18+$((${2:-1}-1))*24)) date +%j
>> zsh: ')' expected
>> If not a bug, is there an alternate syntax I can use in zsh?

Z> What's wrong with $((18+(${2:-1}-1)*24)) ?

Err, nothing, it should work too but it doesn't:

$ TZ=GMT-$((18+(${2:-1}-1)*24)) date +%j
zsh: ')' expected

Z> And the line above works for me (2.6-beta11-test7).

Yes, you're right. It works in 2.6-b10 as well, so I presume the bug
is restricted to the hzoli releases (though I've only verified up to
hzoli10.2). I should have checked this prior to my original post to
the list.

Thanks for the info.

  -mb-




Messages sorted by: Reverse Date, Date, Thread, Author