So i made a shell script to make a file for me then i decided it would be nice if others could use the script so i transfered the script to a php code and tried it out and it worked! (amazingly, first time really doing php.) i spent almost a day learning about how to make a form for this and then a few hours learning how to make everything correctly write to a file, i made it output to a file before making it a full form and everything worked perfectly, then i made it into a form and now the \n function doesnt work. i did some searching and it seems the majority of people use \n and have a problem, are confusing it with html's
but this is being written to a file and isnt html. below is the problem code.
while($x <= $plots){
$txt = "echo starting plot $x/$plots on drive $Drive\n";
fwrite($myfile, $txt);
$txt = "gpuplotgenerator generate $Style $Drive$Semi/Burst/plots/$ID$US$StartNonce$US$PlotSize$US$Ram\n";
fwrite($myfile, $txt);
$x++;
$StartNonce=$StartNonce+$PlotSize+1;
if you need the full script here it is: https://pastebin.com/eb1cMys7