I want to go through the files in a directory with a for loop but this comes up.
echo: bad interpreter: No such file or directory
code:
I have followed the steps from the following link and issue has been resolved.
Ref link: script error - bad interpreter Actually, there was an extra ^M symbol at the end of each line. So, after the removal of that, it worked fine for me.
Hope it helps!