I'm making a bash script; how do I find files not ending with specific extensions?
#!/bin/bash find . -type f -print | grep "\.\(?!psd\|xcf\).+$" Thank you.
You can use -v grep param like this:
find . -type f -print | grep -v "${NOT_PATTERN}" So, in your case you can use:
find . -type f -print | grep -v "\.\(psd|xcf\)$" Documentation
-v, --invert-match Invert the sense of matching, to select non-matching lines.
"\.\(psd|xcf\)$"