View previous topic :: View next topic |
Author |
Message |
dapsaille Advocate


Joined: 02 Aug 2004 Posts: 2366 Location: Paris
|
Posted: Sat Apr 19, 2008 11:26 am Post subject: [OFF?] Liste aléatoire de ligne existantes .. (resolu) |
|
|
Bonjour à tous ..
Voila j'ai monté un chti serveur Call Of Duty 4 (sous Gentoo je vous rassure) et j'en suis à générer un fichier permettant la rotation automatique des cartes et modes de jeu..
Hors j'ai pu générer une liste mais elle n'est pas du tout aléatoire ...
Code: |
.....
gametype koth map mp_warehouse
gametype dom map mp_warehouse
gametype sab map mp_warehouse_ext
gametype dom map mp_warehouse_ext
gametype koth map mp_warehouse_ext
gametype dom map mp_warehouse_ext
gametype sab map mp_wizard
gametype dom map mp_wizard
gametype koth map mp_wizard
gametype dom map mp_wizard
gametype sab map mp_ze_spray
gametype dom map mp_ze_spray
gametype koth map mp_ze_spray
gametype dom map mp_ze_spray
gametype sab map mp_ze_streetrage_beta
gametype dom map mp_ze_streetrage_beta
gametype koth map mp_ze_streetrage_beta
gametype dom map mp_ze_streetrage_beta
.....
|
.. je cherche donc un moyen de faire un more LISTE | aleatoirisatron >> LISTE_2 ...
Ca vous parle ou je suis pas encore assez réveillé ??
Edit = désolé pour le chaton mais il as pas souffert 
Last edited by dapsaille on Sun Apr 20, 2008 11:53 am; edited 1 time in total |
|
Back to top |
|
 |
Grat n00b

Joined: 23 Sep 2006 Posts: 18
|
Posted: Sat Apr 19, 2008 1:33 pm Post subject: |
|
|
À priori :
Code: | more LISTE|sort -R >> LISTE2 |
devrait le faire.  |
|
Back to top |
|
 |
geekounet Bodhisattva


Joined: 11 Oct 2004 Posts: 3772 Location: Wellington, Aotearoa
|
Posted: Sat Apr 19, 2008 1:51 pm Post subject: |
|
|
Grat wrote: | À priori :
Code: | more LISTE|sort -R >> LISTE2 |
devrait le faire.  |
T'as tué un chaton...
Code: | sort -R liste > liste2 |
C'est mieux  |
|
Back to top |
|
 |
Grat n00b

Joined: 23 Sep 2006 Posts: 18
|
Posted: Sat Apr 19, 2008 1:53 pm Post subject: |
|
|
Ça m'apprendra à copier sans réfléchir... >_<
Enfin ça apprendra au chaton surtout. ^o^ |
|
Back to top |
|
 |
gbetous l33t


Joined: 15 Jan 2004 Posts: 679 Location: Toulouse
|
Posted: Sat Apr 19, 2008 1:54 pm Post subject: |
|
|
Grat wrote: | À priori :
Code: | more LISTE|sort -R >> LISTE2 |
devrait le faire.  |
Et même un poil mieux :
Code: | sort -R LISTE >> LISTE2 |
EDIT : oups, trop tard !!!  _________________ Core2Quad Q6600
ASUS P5B-V (i965 video intégrée)
~amd64 / KDE
|
|
Back to top |
|
 |
dapsaille Advocate


Joined: 02 Aug 2004 Posts: 2366 Location: Paris
|
Posted: Sun Apr 20, 2008 11:53 am Post subject: |
|
|
Merci ^^ je teste ca cette semaine ..
Et bon promis je sauverai ce chaton ^^ |
|
Back to top |
|
 |
|