for i in `ioreg -l | grep "current-value" | cut -d"=" -f2`; do echo "$i / 65536 * 9/5+32" | bc -l ; done
This doesn’t work everywhere, alas.
My iBook returns this:
105.80000000000000000000
110.75000000000000000000
114.80000000000000000000
33.98803100585937500000
32.00000000000000000000 <- bogus
32.00002746582031250000
87.80000000000000000000
The iMac G5 returns:
32.04663696289062500000 <- these are all suspect
32.04117126464843750000 <-
32.06311645507812500000 <-
32.01227722167968750000 <-
32.02210998535156250000 <-
32.01738586425781250000 <-
129.20000000000000000000
32.00000000000000000000 <- bogus
(The 32° readings are actually zeroes.)