shell script: bad interpreter: No such file or directory when using pwd

后端 未结 11 1646
抹茶落季
抹茶落季 2021-02-07 09:30

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:

11条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-07 10:11

    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!

提交回复
热议问题