Armed thief who struck twice in five days avoids a jail term