grep -c "stateunreachable"<br><br>This return the count of unreachables<br><br><div class="gmail_quote">On Fri, Aug 12, 2011 at 11:21 AM, Scott Steele <span dir="ltr"><<a href="mailto:roninazure@gmail.com">roninazure@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yes, just one single output depending on "state:reachable" or "state:unreachable". On "state:unreachable" I am looking for a return value, say 5,6, etc. On the "state:reachable" just a value say 0 or even none at all.<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Fri, Aug 12, 2011 at 11:03 AM, David Tomaschik <span dir="ltr"><<a href="mailto:david@systemoverlord.com" target="_blank">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>On Fri, Aug 12, 2011 at 10:57 AM, Scott Steele <<a href="mailto:roninazure@gmail.com" target="_blank">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>
</div></div>Do you need just a single value to be output? And is it actually<br>
looking for output, or a return value?<br>
<font color="#888888"><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" target="_blank">david@systemoverlord.com</a><br>
</font><div><div></div><div><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">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>
</div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br><br>As long as the general population is passive, apathetic, diverted to
consumerism or hatred of the vulnerable, then the powerful can do as
they please, and those who survive will be left to contemplate the
outcome.<br>- <i><i><i><i>2011 Noam Chomsky<br><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i><br>