I am trying to create directory using mkdir inside sh file, when I do that the directory is created, but then when trying to do something to it, I get the message "rm: cannot remove '/testFolder': No such file or directory", but it is there...
What am i doing wrong?
this is my sh file
#!/bin/sh
mkdir -p /testFolder
wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar -O /testFolder/server.jar
echo "cd /testFolder\njava -Xmx1024M -Xms1024M -jar server.jar nogui" >> /testFolder/startMc.sh
then i call the file sudo sh test.sh
testFolder
in/
, not in~
?ubuntu server 19
release. Remove/
in front oftestFolder
and all should work.mkdir testFolder
work? Are there any errors. Most likely you don't run the script. Please edit your question and add all steps you do.