“cannot execute binary file” when trying to run a shell script on linux

前端 未结 5 961
执笔经年
执笔经年 2020-12-16 03:17

I am very new to linux and shell scriprting. I am trying to run a shellscript from secure shell (ssh) on linux using following commands:

chmod +x path/to/myn         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 04:21

    I was getting the same error running my shell script through a bash interpreter in PowerShell. I ran dos2unix myscript.sh on the shell script, and now it runs ok.

提交回复
热议问题