#!/bin/bash
i=1
until [ $i -gt 6 ]
do
    echo "Welcome $i times."
    i=$(( i+1 ))
done
Why we use double () in i=$(( i+1 )),and why if we change the program to
i=$( i+1 )
or
i++
or
$i=$i+1
, it is not correct?
http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/dblparens.html
Similar to the let command, the ((...)) construct permits arithmetic expansion and evaluation. In its simplest form, a=$(( 5 + 3 )) would set "a" to "5 + 3", or 8. However, this double parentheses construct is also a mechanism for allowing C-type manipulation of variables in Bash.
((i++)),((i += 1))or((i = i + 1)).