In centos7, bash 4.2, I am rejected when I try and run my preferred
iterative loop and I don't know why it no longer likes it
for (( i = ${floor}; i < ${ceiling}; i++ )); do
things_and_stuff
done
Anyone know why?
Yes I can still do
i=${floor}
while [[ $(( i += 1 )) -le ${ceiling} ]]; do
things_a
Are you running with sh or with bash? This post might be relevant:
http://stackoverflow.com/questions/13085253/writing-a-for-loop-in-bash-using-a-variable
On Tue, Jun 7, 2016 at 10:45 AM, Bryan O'Neal
wrote:
> In centos7, bash 4.2, I am rejected when I try and run my preferred
> iterative loo
Am 07. Jun, 2016 schwätzte Bryan O'Neal so:
moin moin Bryan,
it works for me using bash 4.3 on debian, so I installed a centos7
container, but it works there as well.
bash-4.2# ( floor=0; ceiling=3; for (( i = ${floor}; i < ${ceiling}; i++
)); do echo $i; done )
0
1
2
bash-4.2#
Diff shopt outp