Mgr scripting parameters

Post Reply
amineidrissi

Mgr scripting parameters

Post 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.
User avatar
tot3nkopf
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 4058
Joined: 02 Feb 2006 10:41
Location: Germany & Romania
Contact:

Re: Mgr scripting parameters

Post 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.
User avatar
tgn
Member
Posts: 803
Joined: 30 Dec 2009 17:59
Location: Germany

Re: Mgr scripting parameters

Post 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...
--- back to basics... focus your eyes to the essential things... ---
Post Reply

Return to “Beginner's questions about the (4400 / Enterprise) PHONE APPLICATION or OPERATING SYSTEM”