From what I understand, you can do C-style for while and while loops in bash.
LIMIT=10
for ((a=1; a <= LIMIT ; a++))
do
echo -n "$a "
done
And even triple operators.
(( var0 = var1<98?9:21 ))
How do you do this using the instructions if?
Also why don't they do bindings like in C? What is the logic of the use of these key words, such as done, do, ifand fi? I will write some scripts, but bash looks very different.
Are there any bash or bash styling methods for alternatives / plugins? I would like to follow the standard, but from the background of C, Java and PHP, bash looks really weird. Utility and standards are important.
source
share