extract only figures of string bash code example Example: get only figures of string bash echo toto.titi.12.tata.2.abc.def | tr -d -c 0-9 #returns 122