Our customers send us an e-mail reuqesting information about some onvoices. We write the e-mail into a text file to filter the invoice numbers. But the invoice number are mixed with the text.
I am trying to create a script file to get just the invoice nomber from the text file and put it into another text file to read it from our aplicacion. But I do not know how to do it, becaus I do no have enough experience with Unix scripts shells.
The invoice numbers is always a 10 (ten) numeric character ans it cam be mixed with special characters.
I have been trying with this command but with not good results.
grep “[0-9]” file.txt
grep “[0-9]\” file.txt
grep “[0-9]\$” file.txt
grep “[0-9]\{10\}” file.etx
etc …
Body text from the e-mail
Mrs. XXXXXXX
Please send me information about these invoices to complete your payment next week.
text text text text text text text text text text
text text text text text text text text text text
text text text text text text text text text text
text text text text text text text text text text
0000007022, 0024076301, 0024076301, 0699411908
text text, 0000007022, 0024076301, 0024076301, 0699411908, text text
text text text0000007022 0024076301 0024076301 0699411908text text text
and so on ……
I will really apreciate it if you can help
Thank you very much !
Best Regards