You may also try:
cat /sys/devices/soc0/soc_id
# or if you want the hex format:
SOC_ID=`printf "0x%x\n" $(cat /sys/devices/soc0/soc_id)`
echo $SOC_ID
# or
cat /sys/devices/soc1/soc_id | cut -d':' -f3
You may also try:
cat /sys/devices/soc0/soc_id
# or if you want the hex format:
SOC_ID=`printf "0x%x\n" $(cat /sys/devices/soc0/soc_id)`
echo $SOC_ID
# or
cat /sys/devices/soc1/soc_id | cut -d':' -f3