how to find the line no for the occurence of that string in a file code example
Example: grep ocurrences
Just use flag -m to define number of occurrences to match:
grep -m1 pattern file
Just use flag -m to define number of occurrences to match:
grep -m1 pattern file