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 had the same problem. Removing #!/bin/bash did the trick for me. It seems that is not necessary to add where bash is located, since it is on the system path.
#!/bin/bash
I found another solution here. Change
for
#!/usr/bin/bash