I would like to remove all files ending with a given set of extensions in aparticular directory in a /bin/sh shell. With a /bin/bash I can do it withregex like this :rm path/(*.pdf|*.png)but this doesn't seem to work with plain sh. Is it normal ? Is there anykind of regex support?
regex in `/bin/sh` shell
shell;wildcards
No, that won't work in a strictly POSIX-compliant shell.  Here's the normative reference:http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_03As you can see, definitely no regex, and not even the {a,b} brace notation.