Page 1 of 1

Mgr scripting parameters

Posted: 29 Sep 2014 08:44
by amineidrissi
Hi everyone,

i need to pass parameters to my mgr script.

mgr -nodico -XX testlog $param1 $param2

script body:

SET Subscriber "1": "$param1"
{
Public_Network_Category_Id = "$param2"
}


thanks in advance.

Re: Mgr scripting parameters

Posted: 29 Sep 2014 09:57
by tot3nkopf
See this:
viewtopic.php?f=222&t=979&hilit=nodico

(search function would have returned it)
You can use the mgr -log blabla.log to log the manual actions under mgr then reproduce what you need with your script.

Re: Mgr scripting parameters

Posted: 29 Sep 2014 14:44
by tgn
just take a bash linux shell programming course. :)
no matter what tool you use (awk or sed)... it can be a way to just make template file like this:
SET Subscriber "1": "XXXSUBSCRIBERXXX"
{
Public_Network_Category_Id = "XXXPUBLICNETWORKCATEGORYXXX"
}

then just replace the XXXVARIABLESXXX with the entries $param1 and $param2 with sed or awk in your bash script and send the output to a "working" file. next step is to call "mgr -nodico -XX workingfile".

regards...