On 10/18/06, Rob Munsch <rmunsch (at) solutionsforprogress.com> wrote: > > > ipmitool sensor | grep Temp | awk -F\| '{print $1,$2,$3,$4}' > > $BBTMP/cputemp.$host > > cpu_temp=`tail -n 4 $BBTMP/cputemp.$host |head -n 1 | awk '{print $2}' > |sed 's/\..*//g'`
Is there a compelling reason not to fold the above into one line:
temp=`ipmitool sensor | tail -n 4 | head -n 1 | awk '{ print $3 }'`
Wups, my bad... Make that:
cpu_temp=`ipmitool sensor | tail -n 4 | head -n 1 | awk '{ print
$3 }' | sed -e 's/\..*//'`