I search through a HUGE file with cat and grep. I need to know on which line is cat all the time.
If i want to search ball:
cat file.txt | grep ball
FILE:
football
tennis
hockey
basketball
...
WHAT I NEED:
1. row - football [1/1000]
2. row - [2/1000]
2. row - [3/1000]
3. row - basketball [4/1000]
awk '/ball/{print $0 " ["NR"]" }' file.txt