That did seem to work, Actually I was making it harder than I needed to.<br><br><div class="gmail_quote">On Fri, Aug 12, 2011 at 11:08 AM, David Tomaschik <span dir="ltr"><<a href="mailto:david@systemoverlord.com">david@systemoverlord.com</a>></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>
<<a href="mailto:david@systemoverlord.com">david@systemoverlord.com</a>> wrote:<br>
> On Fri, Aug 12, 2011 at 10:57 AM, Scott Steele <<a href="mailto:roninazure@gmail.com">roninazure@gmail.com</a>> wrote:<br>
>> Thanks for your help so far on this, I received further clarification as<br>
>> to what I need to do and I think it requires a little tweaking. For the<br>
>> ones that are "state:reachable" I don't need any value returned, or<br>
>> maybe a simple echo statement that says "reachable" or a numeric value<br>
>> of "-1". I can change it if necessary.. For the ones that are in<br>
>> "state:unreachable". I need a count of how many return like that. Say<br>
>> 5,6,7, or so on. So the output I am interested in is:<br>
>><br>
>> -1 (good)<br>
>><br>
>> or<br>
>><br>
>> 5 (bad)<br>
>><br>
>> This is the script so far that I have. For a reference point.<br>
>><br>
>> #!/bin/sh<br>
>><br>
>> export JAVA_HOME=/hosting/products/<br>
>> WebSphereU01/java<br>
>><br>
>> #sets the environment in java<br>
>><br>
>> #the values -p -bp and -ch will need to be altered according to what<br>
>> needs to be run.<br>
>><br>
>> /hosting/ogsa/ogsa-6.1.0.5/ObjectGrid/bin/xsadmin.sh -p 26572 -bp 26570<br>
>> -ch nc3sz2ecmus02 -routetable | sed -e 's/.*state:reachable.*/>0/' e<br>
>> 's/.*state:unreachable.*/<0/' > `date "+%y%m%d%H%M%S"`.txt<br>
>><br>
>> This is the output it produces in its current form.<br>
>><br>
>>>0<br>
>><br>
>>>0<br>
>><br>
>>>0<br>
>><br>
>> And so forth.<br>
>><br>
><br>
> Do you need just a single value to be output? And is it actually<br>
> looking for output, or a return value?<br>
><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>