Daniel Shahaf wrote on Mon, May 09, 2011 at 11:25:08 +0300: > Arfrever Frehtes Taifersar Arahesis wrote on Mon, May 09, 2011 at 00:03:31 > +0200: > > 2011-05-08 13:53:14 danie...@apache.org napisaĆ(a): > > > + FILECOUNT=`echo 2 \* $FILECOUNT | bc` > > > > bc is an external program, which might be unavailable. > > The portable solution is $((...)) syntax: > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04 > > > > I've checked the OpenBSD manpage and it indicated that bc was POSIX > compliant/compatible, so I assumed it was okay to use. > > I haven't found yet an environment which doesn't support $((..)),
SunOS 5.10's /bin/sh chokes: $ echo $((5*2)) syntax error: `(' unexpected Daniel (I didn't test it before because the host I used has a time-based login policy)