On Wed, 2006-01-25 at 13:57 +0100, Frédéric Descamps wrote:
> avec une liste de fichier semblable à celle-ci (liste.txt):
> 
> 01impress_ht_debuter.pdf
> Chandler_linux_0.6.i386.tar.gz
> DOKU_OFF_V_1.pdf
> Pathc+ & TM1000CI_04-01-06.zip
> XYfuvSn
> Zimbra Collaboration Suite Data Sheet.pdf
> Zimbra Quick Start.pdf
> ad-ldapsearch.txt
> 
> la commande suivante (ATTENTION il y a vraiment un carriage return après
> IFS=' : 
> haring tmp # OLDIFS=$IFS; IFS='
> '; for i in $(cat liste.txt); do echo "fichier [$i]"; done; IFS=$OLDIFS

Ah oui ça ça marche, mais dans le mail précédent la commande n'est pas
la même, on avait IFS=' > '. Maintenant ça marche effectivement.

<couic>

> IFS permet de changer les séparateurs des commandes, par défaut c'est
> l'espace,la tablulation et le \n

Bon à savoir. Je viens de trouver l'explication dans man bash.

Merci,
-- 
Rémi

_______________________________________________________
Linux Mailing List - http://www.unixtech.be
Subscribe/Unsubscribe: http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux
Archives: http://www.mail-archive.com/linux@lists.unixtech.be
IRC: chat.unixtech.be:6667 - #unixtech
NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech

Répondre à