<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>It's almost like I know what I'm doing.  I just wrapped it in quotes and pipe delimited it then added to my script to parse it (it's script to post to Slack channels that needed to be fed a channel since I changed how I wanted to separate the alerts).  Just
 added the following and it basically just worked...<br>
</p>
<p><br>
</p>
<p>SCRIPT /path/to/script 'webhook|channelname' <br>
</p>
<p>​<br>
</p>
<p><span style="font-family:monospace"><span style="background-color: rgb(255, 255, 255);"># Parse the recipient to get the channel and key
</span><br>
VAR=`echo $RCPT | awk -F "|" '{ print "webhook="$1; print "channel="$2 }'` <br>
eval $VAR<br>
</span><br>
</p>
<p>It really was that simple...<br>
</p>
<p><br>
</p>
<p>​=G=<br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Ralph Mitchell <ralphmitchell@gmail.com><br>
<b>Sent:</b> Saturday, December 2, 2017 12:13 AM<br>
<b>To:</b> Galen Johnson<br>
<b>Cc:</b> xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] script alerts args</font>
<div> </div>
</div>
<div>
<p><font size="3" face="Arial" color="#FF0000"><b><i>EXTERNAL</i></b> </font></p>
<div>
<div dir="ltr">You might be able to comma-separate multiple args to make them look like one.
<div><br>
</div>
<div>If not, could you just put the multiple args in a flat file and grep at the top of the script for the single $RCPT that gets passed?</div>
<div><br>
</div>
<div>Ralph Mitchell</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Dec 1, 2017 at 11:41 PM, Galen Johnson <span dir="ltr">
<<a href="mailto:Galen.Johnson@sas.com" target="_blank">Galen.Johnson@sas.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hey,<br>
</p>
<p><br>
</p>
<p>Is there any way to have the SCRIPT type recipient take more than 2 args?  I need to be able to feed the script itself more than just the recipient...although, it occurs to me, I might be able to cheat by feeding it that inside a string with a separator. 
 Anyone ever tried to do this?<br>
</p>
<p><br>
</p>
<p>thanks<span class="HOEnZb"><font color="#888888"><br>
</font></span></p>
<span class="HOEnZb"><font color="#888888">
<p><br>
</p>
<p>=G=<br>
</p>
</font></span></div>
<br>
______________________________<wbr>_________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/<wbr>mailman/listinfo/xymon</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>