How to match file extensions regardless of case in a bash script
Let's say I want to match an extension .abc
, but it might appear as .abc
or .abc
. How can I identify all of these .abc
file extension options .abc
?
I am currently using:
ls | grep -i .abc
but I heard that piping for grep is usually not the best idea. Is there a better way to do this?
+3
source to share