Skip to content

Instantly share code, notes, and snippets.

@scandox
Created September 2, 2015 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scandox/3aff84ca0ec48d0c22f9 to your computer and use it in GitHub Desktop.
Save scandox/3aff84ca0ec48d0c22f9 to your computer and use it in GitHub Desktop.
Get PI Serial and MAC
#!/bin/bash
SERIAL=`/bin/grep Serial /proc/cpuinfo | /usr/bin/awk '{print $3}'`
MAC=`/bin/ip link show eth0 | /usr/bin/awk '/ether/ {print $2}'`
echo $MAC > pi-info.txt
echo $SERIAL >> pi-info.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment