Explain grep command.

Asked 15-Apr-2022
Viewed 285 times

1 Answer


0

  • grep is a command-line tool for looking for lines that match a regular expression in plain-text data sets. The ed command g/re/p (globally search for a regular expression and print matching lines) has a similar effect. grep was created for the Unix operating system, but it is now available for all Unix-like systems as well as certain other operating systems like as OS-9.
  • The grep filter looks for a specific pattern of characters in a file and displays all lines that match that pattern. The regular expression refers to the pattern that is searched in the file (grep stands for global search for regular expression and print out).


Read More: What are the basic components of Linux?