<![CDATA[Forum Ubuntu-fr.org / Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?id=346412 Tue, 29 Sep 2009 07:21:41 +0000 FluxBB <![CDATA[Réponse à : Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?pid=2952199#p2952199 Bonjour,

sort <(cat noms) >noms

EDIT : fonctionne en bash et en ksh

]]>
Tue, 29 Sep 2009 07:21:41 +0000 http://forum.ubuntu-fr.org/viewtopic.php?pid=2952199#p2952199
<![CDATA[Réponse à : Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?pid=2951513#p2951513 Voici une solution, peut-être pas la plus élégante mais ça marche :

sort noms> temp && cp temp noms && rm temp
]]>
Mon, 28 Sep 2009 19:31:54 +0000 http://forum.ubuntu-fr.org/viewtopic.php?pid=2951513#p2951513
<![CDATA[Réponse à : Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?pid=2951506#p2951506 Possible... fort probable meme.
Dommage qu'il faille passer par le création d'un autre fichier et de le renommer.
Merci de ton aide.

]]>
Mon, 28 Sep 2009 19:27:42 +0000 http://forum.ubuntu-fr.org/viewtopic.php?pid=2951506#p2951506
<![CDATA[Réponse à : Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?pid=2951499#p2951499 Je pense que le shell prétraite la commande avant de l’exécuter et que le fichier de sortie "noms" est crée sur le disque avant que la commande "sort" ne s'exécute, ce qui fait que ton fichier d'origine est écrasé avant d'avoir été "lu" par la commande "sort".

]]>
Mon, 28 Sep 2009 19:23:48 +0000 http://forum.ubuntu-fr.org/viewtopic.php?pid=2951499#p2951499
<![CDATA[Réponse à : Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?pid=2951473#p2951473 Ca marche bien, mais je ne comprend pas pourquoi la réécriture du fichier ne marche pas.

]]>
Mon, 28 Sep 2009 19:11:29 +0000 http://forum.ubuntu-fr.org/viewtopic.php?pid=2951473#p2951473
<![CDATA[Réponse à : Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?pid=2951458#p2951458 Essaye en donnant un nom différent entre le fichier d'entrée et celui de sortie.

]]>
Mon, 28 Sep 2009 19:05:52 +0000 http://forum.ubuntu-fr.org/viewtopic.php?pid=2951458#p2951458
<![CDATA[Probleme de redirection]]> http://forum.ubuntu-fr.org/viewtopic.php?pid=2951449#p2951449 Je crée une liste de prénom toute simple sous nano.
Je souhaite ensuite la trier et stocker le résultat dans le meme fichier.
Je procede de cette maniere:

sort noms> noms

Le résultat est un fichier noms vide.
Comment cela ce fait-il?

]]>
Mon, 28 Sep 2009 19:02:06 +0000 http://forum.ubuntu-fr.org/viewtopic.php?pid=2951449#p2951449