12 lines
242 B
Bash
12 lines
242 B
Bash
#!/bin/bash
|
|
# For determining the hardware version of a Raspberry Pi
|
|
# https://stackoverflow.com/a/46163991
|
|
|
|
model=""
|
|
while IFS= read -r -d '' substring || [[ $substring ]]; do
|
|
model+="$substring"
|
|
done </proc/device-tree/model
|
|
|
|
|
|
echo $model
|