Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

A bash script to fetch the current temperature of a parallella board

Tags: script
This basically does what xtemp does, in a shell Script. It requires 'bc' which isn't installed by default, so you might want to do a 'apt-get install bc' before running the script.


#!/bin/bash
export P=/sys/bus/iio/devices/iio:device0/in_temp0;
echo "scale=2; ( $(cat ${P}_raw) + $(cat ${P}_offset) ) * $(cat ${P}_scale) / 1000.0" | bc



This post first appeared on Tail -f /dev/random, please read the originial post: here

Share the post

A bash script to fetch the current temperature of a parallella board

×

Subscribe to Tail -f /dev/random

Get updates delivered right to your inbox!

Thank you for your subscription

×