Echo plusieurs noms de fichiers

Résolu/Fermé
michael_scott Messages postés 58 Date d'inscription mercredi 2 avril 2014 Statut Membre Dernière intervention 8 novembre 2018 - 31 mars 2015 à 14:49
michael_scott Messages postés 58 Date d'inscription mercredi 2 avril 2014 Statut Membre Dernière intervention 8 novembre 2018 - 31 mars 2015 à 16:39
Bonjour,

Je m'explique,
j'ai 3 fichiers dans le même répertoire:
image_1.png image_2.png image_3.png

$echo *.png > toto

il sera écrit dans toto : image_1.png image_2.png image_3.png

Je souhaiterai avoir un rendu en colonne tel :
image_1.png
image_2.png
image_3.png

2 réponses

dubcek Messages postés 18718 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 22 mars 2024 5 615
31 mars 2015 à 14:56
hello
essayer
printf "%s\n" *.png > toto
1
michael_scott Messages postés 58 Date d'inscription mercredi 2 avril 2014 Statut Membre Dernière intervention 8 novembre 2018
31 mars 2015 à 14:58
Merci beaucoup Mr Dubcek !

Michael
0
dubcek Messages postés 18718 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 22 mars 2024 5 615
31 mars 2015 à 15:34
ls *.png > toto
affiche aussi sur 1 colonne
0
michael_scott Messages postés 58 Date d'inscription mercredi 2 avril 2014 Statut Membre Dernière intervention 8 novembre 2018
31 mars 2015 à 16:39
effectivement, c'est bcp plus simple ! merci
0
Tu peux pas concaténer un retour chariot ? genre "\n"

tiens :
https://forums.commentcamarche.net/forum/affich-19644843-shell-retour-chariot-dans-une-chaine
0
michael_scott Messages postés 58 Date d'inscription mercredi 2 avril 2014 Statut Membre Dernière intervention 8 novembre 2018
Modifié par michael_scott le 31/03/2015 à 14:58
non ça ne fonctionne pas
$echo -e *.png > toto
toujours le même résultat...
0