Notice: Undefined index: thumbnail in /var/www/sdb/c/f/dahr/core/lib/class.plx.motor.php on line 733
Notice: Undefined index: thumbnail_title in /var/www/sdb/c/f/dahr/core/lib/class.plx.motor.php on line 734
Notice: Undefined index: thumbnail_alt in /var/www/sdb/c/f/dahr/core/lib/class.plx.motor.php on line 735
Notice: Undefined index: date_creation in /var/www/sdb/c/f/dahr/core/lib/class.plx.motor.php on line 742
Notice: Undefined index: date_update in /var/www/sdb/c/f/dahr/core/lib/class.plx.motor.php on line 743 Dahr - Tag echo
http://dahr.free.fr/index.php?tag/echo
frDahr's blogTue, 25 Aug 2015 20:00:00 +0200PluXmlAjouts dans un fichier texte en ligne de commande
http://dahr.free.fr/index.php?article14/ajouts-dans-un-fichier-texte-en-ligne-de-commande
http://dahr.free.fr/index.php?article14/ajouts-dans-un-fichier-texte-en-ligne-de-commande<p>Je me suis enfin décidé à ne plus passer par nano pour rajouter des lignes manuellement dans un fichier texte.<br />
<br />
Pour rajouter une ligne :<br />
<code>echo "votre_contenu" >> fichier.txt</code><br />
<br />
Pour effacer le contenu du fichier et y mettre un nouveau texte:<br />
<code>echo "votre_contenu" > fichier.txt</code><br />
<br />
Pour ajouter plusieurs lignes à la fois à un fichier :<br />
<code>echo -e "votre_contenu_1\nvotre_contenu_2" >> fichier.txt</code><br />
<br />
La ligne de commande c'est puissant!</p>Tue, 25 Aug 2015 20:00:00 +0200dahr