[wplug] Looking for scripting help to parse information

Rob Lines rlinesseagate at gmail.com
Fri Mar 14 08:19:14 EST 2008


Good morning.

I am trying to get some information from the ipmitool specifically the
temperature readings for the CPUs and the ambient temperature.  I can run
the command and it gives me the 3 values on separate lines.  For other
sensors I can just use grep to find the distinct name of the sensors but
with temperature they are all similar.  The CPU values are named Temp and
the ambient temperature is called Ambient Temp.  So while I can run the
output through grep to find the ambient temperature there isn't anything
distinct for the two CPU values.  But they always show up in the same order
so what I would like to do is have a way to grab a specific line and save
that into a variable.  I am sure there is a simple way to do this I am just
not sure where to look for it.

I would prefer to avoid using perl and just stick to shell scripting if
possible.

Thanks for any suggestions.
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.wplug.org/pipermail/wplug/attachments/20080314/271b8721/attachment.html


More information about the wplug mailing list