0

I have a Windows dedicated server and I installed Multicraft to run Minecraft servers, and I wanted to add a accept EULA button, since I did not know much about bat files, so I found a sh file online and I did not want to use Cygwin because I don't know how to install it and make it run properly. I want to change this to a .bat file:

#!/bin/sh echo 'eula=true' > "$SERVER_DIR/eula.txt"

it basically finds the line eula=false in eula.txt and changes it to true from what i understand

1
  • That's not what that line does at all. That line creates a file called eula.txt in the directory represented by the $SERVER_DIR variable and puts the line eula=true in it. If any text exists in eula.txt already, that text is removed. Commented Oct 19, 2015 at 21:43

1 Answer 1

1

I would guess that this is what you're looking for:

echo eula=true>>%SERVER_DIR%\eula.txt

Given the double greater-than symbol it should append the line to the indicated file. Note that we're using a backslash here. You might want to look at the contents of that SERVER_DIR environment variable to see if it will work on a Windows-based computer.

If you want to mirror the behavior in the UNIX script then use a single greater-than symbol to overwrite the file content.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.