BTW...Thanks!<br><br><div class="gmail_quote">On Fri, Aug 12, 2011 at 11:08 AM, David Tomaschik <span dir="ltr">&lt;<a href="mailto:david@systemoverlord.com">david@systemoverlord.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Fri, Aug 12, 2011 at 11:03 AM, David Tomaschik<br>
&lt;<a href="mailto:david@systemoverlord.com">david@systemoverlord.com</a>&gt; wrote:<br>
&gt; On Fri, Aug 12, 2011 at 10:57 AM, Scott Steele &lt;<a href="mailto:roninazure@gmail.com">roninazure@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Thanks for your help so far on this, I received further clarification as<br>
&gt;&gt; to what I need to do and I think it requires a little tweaking. For the<br>
&gt;&gt; ones that are &quot;state:reachable&quot; I don&#39;t need any value returned, or<br>
&gt;&gt; maybe a simple echo statement that says &quot;reachable&quot; or a numeric value<br>
&gt;&gt; of &quot;-1&quot;. I can change it if necessary.. For the ones that are in<br>
&gt;&gt; &quot;state:unreachable&quot;. I need a count of how many return like that. Say<br>
&gt;&gt; 5,6,7, or so on.  So the output I am interested in is:<br>
&gt;&gt;<br>
&gt;&gt; -1 (good)<br>
&gt;&gt;<br>
&gt;&gt; or<br>
&gt;&gt;<br>
&gt;&gt; 5 (bad)<br>
&gt;&gt;<br>
&gt;&gt; This is the script so far that I have. For a reference point.<br>
&gt;&gt;<br>
&gt;&gt; #!/bin/sh<br>
&gt;&gt;<br>
&gt;&gt; export JAVA_HOME=/hosting/products/<br>
&gt;&gt; WebSphereU01/java<br>
&gt;&gt;<br>
&gt;&gt; #sets the environment in java<br>
&gt;&gt;<br>
&gt;&gt; #the values -p -bp and -ch will need to be altered according to what<br>
&gt;&gt; needs to be run.<br>
&gt;&gt;<br>
&gt;&gt; /hosting/ogsa/ogsa-6.1.0.5/ObjectGrid/bin/xsadmin.sh -p 26572 -bp 26570<br>
&gt;&gt; -ch nc3sz2ecmus02 -routetable | sed -e &#39;s/.*state:reachable.*/&gt;0/&#39; e<br>
&gt;&gt; &#39;s/.*state:unreachable.*/&lt;0/&#39; &gt; `date &quot;+%y%m%d%H%M%S&quot;`.txt<br>
&gt;&gt;<br>
&gt;&gt; This is the output it produces in its current form.<br>
&gt;&gt;<br>
&gt;&gt;&gt;0<br>
&gt;&gt;<br>
&gt;&gt;&gt;0<br>
&gt;&gt;<br>
&gt;&gt;&gt;0<br>
&gt;&gt;<br>
&gt;&gt; And so forth.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Do you need just a single value to be output?  And is it actually<br>
&gt; looking for output, or a return value?<br>
&gt;<br>
<br>
</div></div>Answering my own question (I think).  A quick search seems to indicate<br>
that SiteScope cares about return values, not output, so you could<br>
even do something as simple as this:<br>
<br>
return $(/hosting/ogsa/ogsa-6.1.0.5/ObjectGrid/bin/xsadmin.sh -p 26572<br>
-bp 26570 -ch nc3sz2ecmus02 -routetable | grep -c unreachable)<br>
<div><div></div><div class="h5"><br>
<br>
<br>
--<br>
David Tomaschik, RHCE, LPIC-1<br>
System Administrator/Open Source Advocate<br>
OpenPGP: 0x5DEA789B<br>
<a href="http://systemoverlord.com" target="_blank">http://systemoverlord.com</a><br>
<a href="mailto:david@systemoverlord.com">david@systemoverlord.com</a><br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br>