delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/14/21:13:55

Message-ID: <3262FA33.27B2@gbrmpa.gov.au>
Date: Tue, 15 Oct 1996 10:42:59 +0800
From: Leath Muller <leathm AT gbrmpa DOT gov DOT au>
Reply-To: leathm AT gbrmpa DOT gov DOT au
Organization: Great Barrier Reef Marine Park Authority
MIME-Version: 1.0
To: rowe AT epix DOT net
CC: djgpp AT delorie DOT com
Subject: Re: GREP
References: <53uc4h$sa5 AT coconut DOT epix DOT net>

Caltoi wrote:
> 
> I'm a self taught tinkerer in programming and I keep seeing a program
> called grep. What is it and what does it do??
> 
> please reply via email
> --
> Caltoi
> rowe AT epix DOT net
> http://www.epix.net/~rowe

grep = Get Regular ExPression...its used for finding patterns of
information in file/s. Here is a portion of our man page on grep:
(Note: This is for Unix, but gives you a good idea... :)

 NAME
     grep - search a file for a pattern

 DESCRIPTION
     The  grep command searches files for a  pattern  and  prints
     all  lines  that  contain  that  pattern.  It uses a compact
     non-deterministic algorithm.

     Be careful using the characters  $,  *,  [,  ^,  |,  (,   ),
     and  \ in the  search because they are also meaningful
     to  the  shell.   It  is  safest  to  enclose   the   entire
     pattern list in single quotes  '...'.

     If no files are  specified,  grep  assumes  standard  input.
     Normally, each line found is copied to standard output.  The
     file name is printed before each line found if there is more
     than one input file.

   /usr/xpg4/bin/grep
     The options  -E and  -F  affect  the  way   grep  interprets
      pattern list.   If    - E  is  specified,   grep interprets
      pattern_list as a full regular expression  (see    - E  for
      description).  If    - F  is  specified,   grep  interprets
      pattern_list as a fixed string.  If neither are  specified,
      grep interprets pattern  list as a basic regular expression
      as described on  regex(5) manual page.

Leathal.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019