Skip to content

Instantly share code, notes, and snippets.

View xCoreDev's full-sized avatar

xCoreDev

View GitHub Profile
@xCoreDev
xCoreDev / cpustatus.sh
Created January 3, 2016 19:30 — forked from ecampidoglio/cpustatus.sh
A Bash script that prints the current state of the CPU on a Raspberry Pi. It displays variables like temperature, voltage and speed.
#!/bin/bash
# cpustatus
#
# Prints the current state of the CPU like temperature, voltage and speed.
# The temperature is reported in degrees Celsius (C) while
# the CPU speed is calculated in megahertz (MHz).
function convert_to_MHz {
let value=$1/1000
echo "$value"