I have a text file and I have several numbers inside that. Here are some sample numbers.
+-----------+
|NUMBER |
+-----------+
| 75705310 |
| 75779034 |
| 75908237 |
| 75681768 |
I need to grep these numbers from another file in my remote server and the output should be as follows with the number and the count,
1 75964761
2 75964261
Here is my try, But this will not produce any results.
grep -f /data/session_1.log log_20221001 | sort | uniq -c
But when I use as below I could get the result, But I need to check whole list in session_1.log.
grep -o '75964761' log_20221001 | sort | uniq -c
1 75964761
Can someone help me on this issue..