Path: ...!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!news.trigofacile.com!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp1-1.free.fr!not-for-mail From: Thomas Newsgroups: fr.comp.os.unix Mail-Copies-To: nobody Subject: Re: imagemagick References: <87bl3k8cte.fsf@izac.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Date: Thu, 21 Oct 2021 22:13:05 +0200 Message-ID: Lines: 27 Organization: Guest of ProXad - France NNTP-Posting-Date: 21 Oct 2021 22:13:06 CEST NNTP-Posting-Host: 91.175.52.121 X-Trace: 1634847186 news-3.free.fr 3685 91.175.52.121:5043 X-Complaints-To: abuse@proxad.net Bytes: 2001 In article <87bl3k8cte.fsf@izac.org>, Benoit Izac wrote: > Bonjour, > > Le 20/10/2021 à 02:14, Thomas a écrit dans le message >  : > > > le basename de toutes mes images se termine par "_gif", > > puis-je en profiter pour supprimer cette "extension" qui me semble > > inutile, avec une formule pas trop compliquée en bash ? > > for file in *.xpm; do convert "$file" "${file%_gif}.png"; done merci :-) sinon, $ for file in *.gif ; do convert "$file" "$(basename "$file" _gif.gif).png" ; done fonctionne très bien aussi :-) si j'ai bien, compris, les quotes n'ont pas besoin d'échappement grâce à l'usage de $() au lieu de `` ? -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/