Skip to content

Instantly share code, notes, and snippets.

View rgaudin's full-sized avatar

rgaudin rgaudin

  • yɛlɛman
  • Bamako, Mali
View GitHub Profile
@mhzawadi
mhzawadi / pi_version.sh
Last active July 16, 2019 15:14
Get the Pi model
#!/bin/sh
# https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
cpuinfo=`cat /proc/cpuinfo | grep "Revision"|awk -F': ' '{printf $2}'`
model=`cat /sys/firmware/devicetree/base/model`
case ${cpuinfo} in
"0002" )
echo "Revision : 0002 (Model B Rev 1, 256MB)" ;;
"0003" )