On Sat, Apr 14, 2018 at 6:15 PM, Jakub Narebski <jnareb@xxxxxxxxx> wrote: > Derrick Stolee <stolee@xxxxxxxxx> writes: >> + NUM_CHUNKS=$((3 + $(echo "$2" | wc -w))) > > I don't know if it is possible to do the above in a portable shell > without using external 'wc' command. Also, isn't $(( ... )) bashism? $((...)) is POSIX and used heavily in existing Git test scripts.