Created
November 17, 2020 21:10
-
-
Save bkeating/3f584315a776ec6aff8cd580e3c7507a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getserial = () => { | |
const fs = require('fs'); | |
const content = fs.readFileSync('/proc/cpuinfo', 'utf8'); | |
const cont_array = content.split("\n"); | |
const serial_line = cont_array[cont_array.length-2]; | |
const serial = serial_line.split(":"); | |
return serial[1].slice(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment