Skip to content
Commits on Oct 2, 2007
  1. Process patterns containing $ end ^ (but not as last or first char)

    Otto Moerbeek committed
    using regcomp() instead of fastcomp(). ok millert@
Commits on Sep 2, 2007
Commits on May 31, 2007
  1. convert to new .Dd format;

    Jason McIntyre committed
Commits on May 30, 2007
  1. - use a consistent text for STANDARDS

    Jason McIntyre committed
    - note which options are extensions to POSIX
Commits on Feb 13, 2007
  1. @mkilian

    - Be explicit on command line checking, instead of relying on patterns,

    mkilian committed
      which may be NULL (e.g. -e '').
    - let add_pattern() decide how to deal with empty patterns, don't do
      magic in read_patterns().
    This unbreaks stuff like grep -e '', and makes grep -f <file> more
    POSIX compliant. Semantics for grep -f /dev/null (or any other empty
    file) may be questionable, but this case isn't specified by POSIX,
    and matching nothing at all seems to be sane.
    Thanks to otto@, who mentioned potential problems related to the
    -x option with the first patch i sent.
    ok jaredy@ (some time ago), otto@, millert@
Commits on Dec 26, 2006
  1. fts_read returning NULL and errno set is an error. ok ray@

    Otto Moerbeek committed
Commits on Nov 17, 2006
  1. Reset the number of lines of tail context left to print

    Jared Yanovich committed
    before processing each file to avoid printing lines
    intended from the previous file.
    Reported and fix by Charles Longeau <>
    via tech@.
    ok otto millert
Commits on Nov 2, 2006
  1. Check length before checking index of len - 1.

    Ray Lai committed
    OK moritz@.
Commits on Sep 26, 2006
  1. Allow zero-length patterns with -x so

    Jared Yanovich committed
      $ grep -x ""
    matches empty lines as reported on misc@ by
    Martin Marusak <>.
    Initial diff by otto@ with tweaks by me.
    ok otto
Commits on Sep 20, 2006
  1. That should be S_ISREG, dunno why I committed this wrong version;

    Otto Moerbeek committed
    spotted by hshoexer@
Commits on Sep 19, 2006
  1. Use S_IS* macros insted of masking with S_IF* flags. The latter may

    Otto Moerbeek committed
    have multiple bits set, which lead to surprising results. Spotted by
    Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
Commits on Mar 7, 2006
  1. Break patterns containing newlines into multiple patterns like POSIX …

    Otto Moerbeek committed
    Report by Ralf dot Wildenhues at gmx dot de;
    testing by jmc@ ok beck@ millert@
  2. -nv is a valid combination; confirmed by otto

    Jason McIntyre committed
Commits on Feb 9, 2006
  1. delint; remove redundant vars and functions; ok jaredy@

    Otto Moerbeek committed
Commits on Feb 7, 2006
  1. restore cosmic balance by plugging a mem leak; problem reported by

    Otto Moerbeek committed
    Benjamin Pineau in PR 5008; ok weingart@
Commits on Jun 5, 2005
  1. s/-p1003.1-2003/-p1003.1-2004/g

    Jason McIntyre committed
Commits on Apr 25, 2005
  1. - use size_t where appropriate.

    Otto Moerbeek committed
    - check for <= 0 in gzread; it returns -1 on error.
    From christos@netbsd; ok millert@
Commits on Apr 3, 2005
  1. Make the processing of patterns collected from files specified by -f

    Jared Yanovich committed
    delayed so options that affect pattern-building (such as -w) can be
    applied evenly to all such patterns.
    ok and help otto, ok millert
  2. Protect begin and end of word markers added to the pattern when

    Otto Moerbeek committed
    using the -w option with parentheses, to avoid operators in the
    expressions binding to the markers. Compare [[:<:]]foo|bar[[:>:]]
    and [[:<:]](foo|bar)[[:>:]]. Problem spotted by aaron@; ok millert@
    aaron@ jaredy@
Commits on Feb 7, 2005
  1. Due to a braindead zlib, the test for seekability of a gzstream using

    Otto Moerbeek committed
    gzseek(f, 0L, SEEK_CUR) does not work as expected. Instead test the
    underlying stream and remember that. This repairs echo foo | gzip | zgrep foo.
    Problem spotted by Han Boetes in PR 4089; ok millert@
Commits on Feb 2, 2005
Commits on Jan 6, 2005
  1. clarify what -a does;

    Jason McIntyre committed
    prod and ok deraadt@
Commits on Oct 4, 2004
  1. remove the section on extended regular expressions, and point

    Jason McIntyre committed
    people instead to re_format.7: there is now a list of EREs there;
Commits on Oct 3, 2004
  1. Remove block based mmap optimization. There are newline problems

    Otto Moerbeek committed
    (PR 3940, 3941) which can be fixed, but if a match starts at the
    end of a block and continues into the next block, no match will be
    found.  Measurements by millert@ showed that the improvements of
    this optimization are non-measurable anyway. Diff from Alexander Taler.
    ok millert@
Commits on Sep 28, 2004
  1. when stdin is searched, -L and -l print `(standard input)', not `-';

    Jason McIntyre committed
    from alexander taler (pr #3937);
  2. various fixes to make this page a bit clearer and hopefully a bit

    Jason McIntyre committed
    more helpful;
    this includes some ideas/fixes from otto and jared;
Commits on Sep 16, 2004
  1. unused variables; otto ok

    Theo de Raadt committed
Commits on Sep 15, 2004
  1. cast offset value correctly for gzseek

    Theo de Raadt committed
Commits on Aug 11, 2004
  1. Stop search when -q option is given and a match is found. Found by jmc@

    Otto Moerbeek committed
    ok millert@
Commits on Aug 5, 2004
  1. spacing

    Theo de Raadt committed
Commits on May 7, 2004
  1. Make grep -w behave the same for the fastcomp and the regex case,

    Otto Moerbeek committed
    by teaching fastcomp what word boundaries are according to regex.
    ok millert@
  2. Add a new past path for fgrep that is just a simplified version of

    Todd Miller committed
    fastcomp.  This makes fgrep faster and fixes the -w flag w/ fgrep.
    Also remove free_patterns() since calling free right before exit
    is silly.  Problem noticed by espie@
Commits on May 6, 2004
  1. Don't fseek() on stdin if it is a terminal. It does not fail, but

    Otto Moerbeek committed
    what's more more important, it does not work either.
    ok millert@ tedu@
Commits on Apr 17, 2004
  1. -w uses [[:<:]] and [[:>:]], not \< and \>,

    Jason McIntyre committed
    and it's documented in re_format(7), not ex(1);
    from jared yanovich;
    ok beck@
Something went wrong with that request. Please try again.