Path: buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 14 Jun 2022 09:06:11 -0500 Newsgroups: fr.comp.lang.perl Subject: Re: regrouper des fichiers plats puis éclater un fichier X-poster: PEAR::Net_NNTP v1.5.0 (stable) From: jajah References: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Organization: !No_Organization! Message-ID: Date: Tue, 14 Jun 2022 09:06:11 -0500 Lines: 34 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-fUkEP++Y81S1X4v2ql7wVqHOpGrDpn8PRrJyz7Pi1RyHiARxlnEgp7JqU0bRxVd05FwPj6yWcvhs+c4!ELbW+2Y+Y7DLMjA6UR6qE9/TEtR7di1FhkFnCUWHicbQIqIzc6lmfHJHU4hbxnNx0R/1AC0vxh2G X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Bytes: 2130 Le mardi 14 Juin 2022 à 12:17 par Marc SCHAEFER : > jajah >> contient (csv ou txt) et qui ont tous la même structure (11 champs >> séparés par >> des points virgules) >> 2- concaténer/regrouper ces fichiers en un seul et lui donner un nom de >> type >> ABC-123 >> >> > un simple cat du shell bash pourrait-il suffire? > > cat > ABC-123 $(find . -name '*.csv'; find . -name '*.txt) > > ou si par répertoire: > > for i in * > do > cat > $(basename $i)-ABC-123 $(find . -name '*.csv'; find . -name '*.txt) > done > > Bash est désormais même disponible sous Microsoft (Git bash > p.ex.). > >> II- Phase 2 : découper un fichier reçu >> 1- découper un fichier (3 champs) en plusieurs fichiers selon un >> critère Í  >> savoir le dernier champ (exp ABCDE1234) >> >> > LÍ  par contre, effectivement, Perl semble une bonne idée. Bonjour, Tout d'abord merci pour cette réponse. Effectivement, c'est simple et efficace pour traiter de cette partie I, merci