HOME       PACKAGES       SCRIPTS

Grep for Newbies

grep is the basic unix/linux command for finding linex in a file containing a specified phrase or keyword. We can also use grep to find a specified keyword or phrase in the output of another command, as well as use grep to identifying files containing a phrase, pattern, or keyword.

To save myself unnecessary writing, I thought I'd try finding a user-friendly discussion of grep for Linux command line newbies, but I wasn't totally satisfied with the results.

The shortest, simplest explanation I found was at

  • http://freeengineer.org/learnUNIXin10minutes.html#Grep
  • Short and sweet, but maybe too short if you want to understand how to use grep better when you are searching for something other than just a single word.

    The first of the following articles looks like the very best of the ones I have selected, if you want some user-friendly down-to-earth details, but you may find information you like in either of the other two articles as well.

    Grep - Linux Commands by Bob Rankin
     
    How to use the grep command, by The Linux Information Project
     
    Drew's grep tutorial

    Page Revised April 17, 2013