Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ SED via Bash Script

Posted by: Khionu Sep 5 2014, 09:46 AM

Hi, I'm attempting to make a bash script that will change the world that is loaded in my Minecraft Server, which is hosted on an Ubuntu 14.04 x64 Server powered VPS

Since the server loads the world from a simple configuration file, using SED to change the line is sufficient. Here's what code I wrote:


$world = $1
$line = 'level-name='$world

sed -e '30,s/*/'$line'/' /path/to/my/mc/

This is supposed to be executed like this:

My programming experience is mostly from Web Development, and I've mainly used Perl and Java, so I can be considered a novice when it comes to Bash, and SED is brand new to me.... Thanks for reading, and thanks ahead of time for your time smile.gif


Powered by Invision Power Board (
© Invision Power Services (