il y a aussi une version plus "C" style: for ((i=0;i<10;i++)) do echo $i done
Le samedi 11 février 2006 à 22:47 +0100, Alain EMPAIN a écrit : > > Eric Darchis wrote: > > Bonjour, > > > > Je me pose cette question en moyenne une fois par an et à chaque fois, > > je galère pour trouver la réponse: > > Il existe sous Linux une commande qui génère une série de nombres. Et je > > ne me souviens plus de son nom. > > > > C'est tout simple mais extrêmement utile par exemple pour créer 50 > > répertoires: > > for i in `commande 1..50`; do > > mkdir repertoire$i > > done > > > start end : > ------------ > for i in `seq 13 18` > do echo TRUC.$i > done > TRUC.13 > TRUC.14 > TRUC.15 > TRUC.16 > TRUC.17 > TRUC.18 > > Ou : start increment stop > ------------------------- > for i in `seq 13 2 18`; do echo TRUC.$i; done > TRUC.13 > TRUC.15 > TRUC.17 > > Il y a aussi > > echo $RANDOM > qui rend un nombre différent à chaque fois. > > Bonne fin de soirée, > > Alain > > > > Merci de répondre en privé, histoire d'éviter le flood de réponses. Si > > tout le monde a répondu en privé, je posterai la réponse moi-même. > > > > Ma mémoire défaillante et moi vous remercions d'avance. > > > > Eric. > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________________ > > Linux Mailing List - http://www.unixtech.be > > Subscribe/Unsubscribe: > > http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux > > Archives: http://www.mail-archive.com/linux@lists.unixtech.be > > IRC: chat.unixtech.be:6667 - #unixtech > > NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech > > _______________________________________________________ > Linux Mailing List - http://www.unixtech.be > Subscribe/Unsubscribe: http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux > Archives: http://www.mail-archive.com/linux@lists.unixtech.be > IRC: chat.unixtech.be:6667 - #unixtech > NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech
_______________________________________________________ Linux Mailing List - http://www.unixtech.be Subscribe/Unsubscribe: http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux Archives: http://www.mail-archive.com/linux@lists.unixtech.be IRC: chat.unixtech.be:6667 - #unixtech NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech