Starting with for
works
root@messagerie-secours[10.10.10.19] /home/serveur # python -c "for x in xrange(10):print x;"
0
1
2
3
4
5
6
7
8
9
root@messagerie-secours[10.10.10.19] /home/serveur #
If you have for in the middle, it's a syntax error :
root@messagerie-secours[10.10.10.19] /home/serveur # python -c "a=2;for x in xrange(10):print x;"
File "<string>", line 1
a=2;for x in xrange(10):print x;
^
SyntaxError: invalid syntax
root@messagerie-secours[10.10.10.19] /home/serveur #
Is it possible to get rid of that syntax error ?