How to Use grep to Display Filenames & Line Numbers Before Matching Lines

Share
  • July 17, 2022
grep is a Linux utility commonly used for searching file contents, or any input passed to it. When searching through multiple files, it’s useful to display the filename and line numbers, especially when using it to automate in shells scripts.

Read This Article on How-To Geek ›

Source :

How to Use grep to Display Filenames & Line Numbers Before Matching Lines