Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.os.unix > #7850
| From | Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> |
|---|---|
| Newsgroups | fr.comp.os.unix |
| Subject | Re: imagemagick |
| Date | 2021-10-22 10:05 +0200 |
| Organization | Université de Strasbourg |
| Message-ID | <87bl3h5vsc.fsf@universite-de-strasbourg.fr.invalid> (permalink) |
| References | (1 earlier) <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> |
Thomas <fantome.forums.tDeContes@free.fr.invalid> writes:
> $ for file in *.gif ; do convert "$file" "$(basename "$file"
> _gif.gif).png" ; done
> fonctionne très bien aussi :-)
Je ne vois pas très bien pourquoi utiliser basename ici (son rôle est en
général de supprimer la partie répertoire d'un chemin). Il suffit 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é la liste du for : si tu as un fichier sans la partie
"_gif" tu récupérerais xxx.gif.png
-- Alain.
Back to fr.comp.os.unix | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-10-18 22:02 +0200
Re: imagemagick pehache <pehache.7@gmail.com> - 2021-10-18 22:25 +0200
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-10-19 00:12 +0200
Re: imagemagick Nicolas George <nicolas$george@salle-s.org> - 2021-10-19 10:16 +0000
Re: imagemagick Olivier Miakinen <om+news@miakinen.net> - 2021-10-19 14:08 +0200
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-10-20 03:12 +0200
Re: imagemagick pehache <pehache.7@gmail.com> - 2021-10-20 07:50 +0200
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-10-21 22:39 +0200
Re: imagemagick pehache <pehache.7@gmail.com> - 2021-10-22 16:43 +0000
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-11-30 03:08 +0100
Re: imagemagick pehache <pehache.7@gmail.com> - 2021-11-30 22:27 +0100
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-12-01 02:25 +0100
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-12-19 15:44 +0100
Re: imagemagick pehache <pehache.7@gmail.com> - 2022-01-02 13:54 +0100
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-10-20 02:14 +0200
Re: imagemagick pehache <pehache.7@gmail.com> - 2021-10-20 07:44 +0200
Re: imagemagick pehache <pehache.7@gmail.com> - 2021-10-20 07:54 +0200
Re: imagemagick Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2021-10-20 09:20 +0200
Re: imagemagick pehache <pehache.7@gmail.com> - 2021-10-20 15:24 +0000
Re: imagemagick Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2021-10-20 07:50 +0200
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-10-21 22:13 +0200
Re: imagemagick Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2021-10-22 07:56 +0200
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-11-30 01:34 +0100
Re: imagemagick Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2021-10-22 10:05 +0200
Re: imagemagick Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2021-11-30 01:32 +0100
Re: imagemagick Nicolas George <nicolas$george@salle-s.org> - 2021-10-19 10:14 +0000
Re: imagemagick khtmhai5 <nospam_khtmhai5@gmail.com.invalid> - 2022-06-21 05:21 -0500
csiph-web