[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1100723 - /subversion/trunk/tools/dev/benchmarks/large_dirs/create_bigdir.sh

From: Daniel Shahaf <danielsh_at_apache.org>
Date: Mon, 9 May 2011 15:06:15 +0300

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 danielsh_at_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)
Received on 2011-05-09 14:08:13 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.