trying to write a new sed command that will insert new lines before another line.
the code i have tried and is failing is:
sudo sed -i '/# onlynet=ipv4/i echo "rpcallowip='$WebInternalIP'\n";\necho "rpcallowip='$DBInternalIP'\n";\necho "rpcallowip='$StratumInternalIP'\n";' $STORAGE_ROOT/yiimp/site/web/yaamp/modules/site/coin_form.php
The new lines need to read:
echo "rpcallowip=$Variable\n"; example, echo "rpcallowip=127.0.0.1\n";
the code above is producing the following result:
echo "rpcallowip=10.0.0.3 ";
So it is seeing the \n as another new line instead of part of the line.