When the .sh script is executed, the error message "$'\r': command not found" is displayed.
In Windows OS, the newline character is \r\n. In Linux, the newline character is \n. If the .sh script contains newline characters of Windows OS and is directly uploaded to the Linux OS for execution, the \r characters cannot be identified by the Linux OS. As a result, the error message "$'\r': command not found" is displayed.
Run the sed -i 's/\r//' *.sh command on Linux to delete \r from the .sh script.