2022-09-15 08:34:34 +0100, zzapper: [...] > if [[ $f =~ '.jpg|gif|png|jpeg' ]] ;then echo 'ok' ;else echo 'nok' ;fi [...] ITYM if [[ $f =~ '\.(jpe?g|gif|png)$' ]] Or (better as regexps can often not be used with non-text while zsh globs can): if [[ $f = *.(jp(e|)g|gif|png) ]] -- Stephane