I\'m using grep to match string in a file. Here is an example file:
example one,
example two null,
example three,
example four null,
grep
Use -n
or --line-number
.
Check out man grep
for lots more options.
Refer this link for linux command linux http://linuxcommand.org/man_pages/grep1.html
for displaying line no ,line of code and file use this command in your terminal or cmd, GitBash(Powered by terminal)
grep -irn "YourStringToBeSearch"