mercredi 31 décembre 2014

For loop brackets - C like syntax


When i am using the below syntax to iterate why two brackets are needed ?



for (( expr1; expr2; expr3 ))
do
command1
command2
..
done


and the below code doesn't work ? and throws error "syntax error near unexpected token `('"



for ( expr1; expr2; expr3 )
do
command1
command2
..
done


Aucun commentaire:

Enregistrer un commentaire