#!/bin/bash

imei=$(tcmd-at 'at*mrd_imei=r,1') || 
die "Error: can not read IMEI, check if it's production mode? Has IMEI been set before?"

echo "$imei" | grep -o -E '[[:digit:]]{14,}'
