You can convert line endings of your script to UNIX format using a utility like
dos2unixif it’s not already available on your system. You can use the package manager for your Linux distribution to install it.
Open a terminal and navigate to the directory where your script is located.
Run the following command to convert the line endings of your script to UNIX format:
After the conversion, try running the script again:
Alternatively, if you don’t have access to
dos2unix or prefer not to use it, you can try manually converting the line endings using a text editor that supports the conversion. Save the file with UNIX-style line endings and then try running the script again.