voilà ce qu'il faut faire : OLDIFS=$IFS; IFS=' > '; for i in $(cat liste.txt); do echo "fichier [$i]"; done; IFS=$OLDIFS
bon amusement
On Wed, 2006-01-25 at 13:05 +0100, Rémi Letot wrote:
> hello,
>
> comme tout est calme et que j'ai un petit problème, je m'adresse aux
> experts :-)
>
> J'ai une liste de noms de fichiers auxquels je dois appliquer un
> traitement. J'ai réussi sans problème pour la plupart, mais certains de
> ces noms contiennent un espace, et là je n'y arrive pas. Quoi que je
> fasse, le shell exécute la commande sur chacune des parties du nom. J'ai
> essayé plusieurs méthodes (for i in `cat liste`, cat liste | xargs,...),
> mais rien n'y fait.
>
> Au secours :-)
>
> Merci,
--
Best regards,
Fred.
\ /
\/__ T e n d
/\ Frédéric Descamps
/ \ Senior Linux Consultant
RedHat Certified Engineer - MySQL Core & Pro Certified
-------------------------------------------------------------------------------
(o- Linux Rules
//\ No HTML in emails
V_/_ http://www.x-tend.be/~fred
-------------------------------------------------------------------------------
signature.asc
Description: This is a digitally signed message part
_______________________________________________________ Linux Mailing List - http://www.unixtech.be Subscribe/Unsubscribe: http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux Archives: http://www.mail-archive.com/[email protected] IRC: chat.unixtech.be:6667 - #unixtech NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech

