#!/bin/bash shopt -s extglob nom=image.jpg if [ "$nom" == *.jpeg ] # correspondance vue précédemment then echo "bonne correspondance" else echo "mauvaise correspondance" fi nom=image.jpg if [[ "$nom" = *.@(jpg|jpeg) ]] # (ligne 12) # emploi de globs (ou motifs) étendus : @ voir tableau ci-dessus then echo "bonne correspondance" else echo "mauvaise correspondance" fi