I am new to grep and have used a couple times. I am now on a new project where I have txt or excel files that have records that have similar format to below. There are thousands of records and all have different formats, so I need a way to just pull any and all 10 digit numbers it finds in each record and put those 10 digit numbers in to a new txt file.
/20180130124137_7602053275_13362514943
another example
/20180130-084548_3109217528
The end result I am looking for would be for the new file to have added 7602053275
from the first record above as that is the only 10 digit number in that record and 3109217528
from the second example above.
Thanks,