J'ai un petit souci, la commande system("ma commande unix"); ne fonctionne plus lorsque je l'insère dans une boucle.
par exemple :
Merci de votre aide.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 char command[256]; int a; for (a =0; a < 5; ++a) { sprintf(command, "echo %s >> test.txt", a); system(command); }
Partager