#!/bin/sh
cc=$(cat /proc/cpuinfo | grep Serial | awk '{printf "0x"$3}' | head -c 4 | awk '{printf "%d",$1}')
cc1=$(cat /proc/cpuinfo | grep Serial | awk '{printf "0x"$3}'| head -c 4)
ln=$(($cc/5+1))
col=$(($cc%5+1))
rcode=$(cat /lib/wifi/cc.map | awk 'NR=='$ln',FS="[ ,]+" {printf $'$col'}')
echo CC: $cc1, RC: $rcode
