I have my primary file(log1.txt) strings below.
T202210010515.XX.old:2022-10-01 10:57:56<Other Texts>975673849<0ther Texts>975673849
T202210010515.XX.old:2022-10-01 10:59:56<Other Texts>975673449<0ther Texts>975673449
T202210010515.XX.old:2022-10-01 10:57:58<Other Texts>975673849<0ther Texts>975673849
T202210010515.XX.old:2022-10-01 10:59:51<Other Texts>975673849<0ther Texts>975673849
T202210010515.XX.old:2022-10-01 10:57:52<Other Texts>975673849<0ther Texts>975673849
T202210010515.XX.old:2022-10-01 10:59:59<Other Texts>975673449<0ther Texts>975673449
Each and every set is starting with T202210*. I need to grep the number and return the lines count which that numbers occured. I have another secondary file with all the numbers which I need to search(numbers.txt). Here is what I need as the output, The Number and the lines count of each number.
975673849 -4
975673449 -2
Here is my try.
grep -f numbers.txt log1.txt
But this will produce all the string lines with a highlighted number. Can someone help me to produce the output what I need actually.
<Other Texts>
contain digits?