When I performed my .sh file, I got the following error:
andy@DESKTOP-ABGRI18:/mnt/c/Users/andyl/Downloads$ sh mydeploy1.sh
mkdir: cannot create directory ‘temp\r’: No such file or directory
The reason is most likely my .sh file has some /r characters so that Ubuntu can't understand. There is a pretty simple way to solve this problem. I just removed these /r characters by sed command and then everything works fine.
For example
andy@DESKTOP-ABGRI18:/mnt/c/Users/andyl/Downloads$ sed $'s/\r$//' ./mydeploy1.sh > ./mydeploy1.new.sh
留言
張貼留言