Tr avec plusieurs fichiers

Bonjour,

tr -d ‘\r\n’ < test.php > test1.php
fonctionne

Par contre :

tr -d ‘\r\n’ < *.php > *1.php ;
bash: *.php : redirection ambiguë

tr -d ‘\r\n’ < *.php > *1.php ;
bash: *.php: Aucun fichier ou dossier de ce type

Merci

michel@debG53SW:~$ mkdir tstTr && cd tstTr michel@debG53SW:~/tstTr$ touch {a..h}xyz.php && ls axyz.php bxyz.php cxyz.php dxyz.php exyz.php fxyz.php gxyz.php hxyz.php michel@debG53SW:~/tstTr$ for fich in *.php; do echo "tr -d '\r\n' $fich > ${fich%.*}1.php"; done tr -d '\r\n' axyz.php > axyz1.php tr -d '\r\n' bxyz.php > bxyz1.php tr -d '\r\n' cxyz.php > cxyz1.php tr -d '\r\n' dxyz.php > dxyz1.php tr -d '\r\n' exyz.php > exyz1.php tr -d '\r\n' fxyz.php > fxyz1.php tr -d '\r\n' gxyz.php > gxyz1.php tr -d '\r\n' hxyz.php > hxyz1.php michel@debG53SW:~/tstTr$ Si le retour de la dernière commande te conviens, il ne te reste plus qu’à enlever le [mono]echo[/mono] et les [mono]"[/mono].

Ce qui donne :for fich in *.php; do tr -d '\r\n' $fich > ${fich%.*}1.php; done

Ça fonctionne nickel, merci MicP !