Home Learn Linux Linux Tutorials Command line made easy: five simple recipes for grep

Command line made easy: five simple recipes for grep

Article Source Ars Technica
May 5, 2009, 6:09 pm
companion photo for Command line made easy: five simple recipes for grep

The grep command is regarded as one of the most essential building blocks of command line automation. It is a search tool that can be used to perform basic text filtering and processing tasks on files and streams. Although it is deceptively simple, it can sometimes take the challenge out of finding the proverbial needle in a haystack. In this article, I'm going to show you several examples of how it can be used to perform real-world tasks.

The most common and basic scenario of grep usage is a text search. It can be used to find instances of a word or phrase in files and text streams. You can invoke it at the command line by typing the command name, the search query, and the target files in which to search.



Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFS201 Essentials of System Administration
    12 Jan » 30 Mar - Online Self-Paced
  2. LFD312 Developing Applications For Linux
    11 May » 15 May - Austin - TX + Virtual (GUARANTEED TO RUN)
  3. LFD331 Developing Linux Device Drivers
    11 May » 15 May - Virtual (GUARANTEED TO RUN)

View All Upcoming Courses

Become an Individual Member
Check out the Friday Funnies

Sign Up For the Newsletter

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board