#!/bin/bash a=0 b=".jpg" for a in `ls | grep $b` do # retire l'extention a=`echo $a | cut -f1 -d'.'` # les guillemets permettent la concaténation magick $a$b -scale 76% "$a"_petit"$b" magick $a$b -scale 50.5% "$a"_mini"$b" done b=".png" for a in `ls | grep $b` do # retire l'extention a=`echo $a | cut -f1 -d'.'` # les guillemets permettent la concaténation magick $a$b -scale 76% "$a"_petit"$b" magick $a$b -scale 50.5% "$a"_mini"$b" done