Why does the restart script work (Minecraft / Linux / vServer)?

Sp
10

Start.sh:

#! / bin / bash

BINDIR = $ (dirname "$ (readlink -fn" $ 0 ")")
cd "$ BINDIR"
while true
do
screen -AmdS lobby java -Xms500M -Xmx1024M -jar spigot.jar
done

error:

bash: ./start.sh: / bin / bash ^ M: bad interpreter: No such file or directory

Do

Is this the script from the Minecraft Server folder?

br

Sed -i -e 's / \ r $ //' start.sh

Sp

Yes

Sp

And where should that go?

Do

Then try sed -i -e 's / \ r $ //' scriptname.sh
and then sed -i -e 's / \ r $ //' scriptname.sh

there's not only a good question, there are already threads

Do

Oh man I can't always cope with these code blocks

br

Execute the command as it is in the directory where start.sh is or run from somewhere and adjust the path accordingly

Sp

I just made it, there's no more error, but nothing happens.

Da

Microsoft is responsible for that. They use a different identifier for a line end.

You created the script on a Windows PC.

Find a tool like "DosToUnix" and convert the file.

Unfortunately I forgot what it's really called, if you don't have Windows, you don't need it either.

Sp

I did this through this website (https://www.fileformat.info/convert/text/dos2unix.tr) but now this error message comes up when I start:

BINDIR = $ (dirname: bad interpreter: No such file or directory