#!/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"
