#!/bin/bash
s ="123 1 2 3 - works, the first number is two+ digits, the rest are one digits
1 2 3 45 - does not work, the first number is one-digit
14 2 3 4 - works
123 a2 - not output as expected as there is just one number
12 and one 1 more and 23 and 6 and some more 3546
hello 123 my 1 name 2 is 3 - output fine since the first number is three-digit and the rest are one digit"
grep -E '(\<[[:digit:]]+\>.*){4,}' <<< "$s "
IyEvYmluL2Jhc2gKcz0iMTIzIDEgMiAzICAtIHdvcmtzLCB0aGUgZmlyc3QgbnVtYmVyIGlzIHR3bysgZGlnaXRzLCB0aGUgcmVzdCBhcmUgb25lIGRpZ2l0cwoxIDIgMyA0NSAtIGRvZXMgbm90IHdvcmssIHRoZSBmaXJzdCBudW1iZXIgaXMgb25lLWRpZ2l0CjE0IDIgMyA0IC0gd29ya3MKMTIzIGEyIC0gbm90IG91dHB1dCBhcyBleHBlY3RlZCBhcyB0aGVyZSBpcyBqdXN0IG9uZSBudW1iZXIKMTIgYW5kIG9uZSAxIG1vcmUgYW5kIDIzIGFuZCA2IGFuZCBzb21lIG1vcmUgMzU0NgpoZWxsbyAxMjMgbXkgMSBuYW1lIDIgaXMgMyAtIG91dHB1dCBmaW5lIHNpbmNlIHRoZSBmaXJzdCBudW1iZXIgaXMgdGhyZWUtZGlnaXQgYW5kIHRoZSByZXN0IGFyZSBvbmUgZGlnaXQiCgpncmVwIC1FICcoXDxbWzpkaWdpdDpdXStcPi4qKXs0LH0nIDw8PCAiJHMiCg==