Deutsch   English   Fran├žais   Italiano  
<87bl3h5vsc.fsf@universite-de-strasbourg.fr.invalid>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!aioe.org!Faqf6A55NG1s8DSVkh3L9A.user.46.165.242.75.POSTED!not-for-mail
From: Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid>
Newsgroups: fr.comp.os.unix
Subject: Re: imagemagick
Date: Fri, 22 Oct 2021 10:05:39 +0200
Organization: =?utf-8?Q?Universit=C3=A9?= de Strasbourg
Message-ID: <87bl3h5vsc.fsf@universite-de-strasbourg.fr.invalid>
References: <fantome.forums.tDeContes-4DA7F8.22020718102021@news.free.fr>
	<it63ieFhgt4U1@mid.individual.net>
	<fantome.forums.tDeContes-339A40.00125719102021@news.free.fr>
	<fantome.forums.tDeContes-F7FF88.02144620102021@news.free.fr>
	<87bl3k8cte.fsf@izac.org>
	<fantome.forums.tDeContes-C72036.22130521102021@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: gioia.aioe.org; logging-data="22161"; posting-host="Faqf6A55NG1s8DSVkh3L9A.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:SbAvbWdya4p2ZwD3xPEhVqCqZCA=
Bytes: 1916
Lines: 17

Thomas <fantome.forums.tDeContes@free.fr.invalid> writes:

> $ for file in *.gif ; do convert "$file" "$(basename "$file"=20
> _gif.gif).png" ; done
> fonctionne tr=C3=A8s bien aussi :-)

Je ne vois pas tr=C3=A8s bien pourquoi utiliser basename ici (son r=C3=B4le=
 est en
g=C3=A9n=C3=A9ral de supprimer la partie r=C3=A9pertoire d'un chemin). Il s=
uffit de
faire une expansion en supprimant le suffixe.

for file in *_gif.gif ; do convert "$file" "${file%_gif.gif}.png" ; done

J'ai aussi chang=C3=A9 la liste du for : si tu as un fichier sans la partie
"_gif" tu r=C3=A9cup=C3=A9rerais xxx.gif.png

-- Alain.