I am trying to match and loop through files with extensions .txt .h .py. in specific folder ${arg}. Here is what I did
for file in ${arg}/*.{txt, h, py}; do
...
done
However I got no such file for all extensions even though I have such files.
line 24: dir1/*.{txt,: No such file or directory
line 24: h,: No such file or directory
line 24: py}: No such file or directory
How can I loop though the files with specified extensions using for
?