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.
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:So, in your case you can use:
Documentation
You can use:
Or without regex: