I'm trying to iterate over the files in a directory and perform an operation on only the files with specific extensions. Unfortunately my bash-fu is weak today, can anyone help?
In this example, I'm looking for files that end with ".txt" or ".doc":
for myFile in $myDir
if [[ $myFile =~ \.(txt|doc)$ ]] ; then