On Thu, Apr 23, 2015 at 01:01:43AM +0100, Dr Alun J. Carr wrote:
> Well, to be strictly conformant with heirloom SysV sh,
Nobody cares about compatibility with Bourne shell any more. Not since
Solaris finally pulled its head out of its ass and put a POSIX sh in
/bin (20 years after everyone else)
Well, to be strictly conformant with heirloom SysV sh, we have to use the
following (which is uglier than Cobol with a hangover):
#looper2-sh.sh
n=4
i=1
while [ $i -le $n ]
do
echo i = $i
i=`expr $i + 1`
done
which also works with dash and mksh. Perhaps this needs to go into a FAQ
somew
On 04/21/2015 01:44 PM, Dr Alun J. Carr wrote:
> Tests were done with bash, ksh, zsh, pdksh, dash and heirloom System V Bourne
> sh with the following versions:
> bash 3.2.57(1)
> bash 4.3.33(1)
> ksh version sh (AT&T Research) 93u+ 2012-08-01
> zsh 5.0.5 (x86_64-app
On Tue, Apr 21, 2015 at 2:44 PM, Dr Alun J. Carr
wrote:
> There appears to be a bug in bash when using a variable in curly brace
> expansion, e.g., {1..$n}. I have put the two following test scripts in the
> attached files looper1.sh and looper2.sh:
>
> #looper1.sh
> for i in {1..4}
> do
> ec
On Tue, 21 Apr 2015, Dr Alun J. Carr wrote:
There appears to be a bug in bash when using a variable in curly
brace expansion, e.g., {1..$n}. I have put the two following test
scripts in the attached files looper1.sh and looper2.sh:
Brace expansion is done before variable expansion:
T