OpenBSD CVS

CVS log for src/usr.bin/grep/grep.1


[BACK] Up to [local] / src / usr.bin / grep

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.53 / (download) - annotate - [select for diffs], Wed Nov 15 00:50:43 2023 UTC (6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored)

procline: only reduce mcount once per line, not once per match.
This makes "grep -m" behave like GNU grep (where the -m option
originated).  From Crystal Kolipe.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jan 4 07:33:00 2023 UTC (16 months, 2 weeks ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored)

- use Fl instead of Ar for print0; from josiah frentsos
- while here, describe it as a primary rather than an option

Revision 1.51 / (download) - annotate - [select for diffs], Sun Jun 26 10:57:36 2022 UTC (22 months, 3 weeks ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.50: +12 -2 lines
Diff to previous 1.50 (colored)

grep: add --null flag

makes grep print an ASCII NUL byte after the file name to make the
output unambiguous even in the presence of file names with funny
characters.

A previous iteration of this diff was improved by benno@ and tedu@ and
discussed also with sthen@ and deraadt@.  deraadt@ also improved the
manpage changes in this version of the diff.

OK deraadt@

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 3 08:48:49 2019 UTC (4 years, 5 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.49: +6 -1 lines
Diff to previous 1.49 (colored)

Document implicit "." default file for -R

OK visa deraadt

Revision 1.49 / (download) - annotate - [select for diffs], Mon Oct 7 20:51:34 2019 UTC (4 years, 7 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored)

jmc is a stickler for consistency.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Oct 7 17:47:32 2019 UTC (4 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.47: +7 -2 lines
Diff to previous 1.47 (colored)

two compat features to allow the zstdgrep script to work.
add --label option to prefix the output instead of filename.
allow using - to mean stdin.
ok deraadt

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jul 18 15:32:50 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.46: +3 -4 lines
Diff to previous 1.46 (colored)

Delete documentation of --max-count, which is merely an alias of
the documented -m.  As a rule, we only document long options when
users can't avoid them because they lack a short version.

As suggested by tedu@, as an exception, leave --context documented
because -C is awkward in so far as it takes an optional option
argument, which is fragile and error-prone and hence generally
discouraged, including by POSIX.

Two years ago, kettenis@, deraadt@, and tedu@ all agreed that this
is what should be done, and jmc@ was happy to accept the direction,
but somehow everybody forgot to commit.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 17 04:24:20 2019 UTC (4 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.45: +6 -4 lines
Diff to previous 1.45 (colored)

when combining -o and -b, print the byte offset of the pattern, not line.
originally from chrisz

Revision 1.45 / (download) - annotate - [select for diffs], Sun Dec 10 09:17:24 2017 UTC (6 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.44: +8 -14 lines
Diff to previous 1.44 (colored)

- add max-count to SYNOPSIS
- list long options with short, where they have an equivalent
- sync usage()
- minor tweaks

Revision 1.44 / (download) - annotate - [select for diffs], Sat Dec 9 18:38:37 2017 UTC (6 years, 5 months ago) by pirofti
Branch: MAIN
Changes since 1.43: +8 -3 lines
Diff to previous 1.43 (colored)

Add support for the non-standard grep -m extension.

grep -m num stops after a maximum of num matches are found.
We support -m0 to match GNU behaviour, but we do not allow negative
numbers.

Manpage help from jmc@, OK deraadt@.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Jan 13 04:45:34 2015 UTC (9 years, 4 months ago) by daniel
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

An article on medium.com highlighted that grep
was available in v4.

To quote Ken Thompson, grep appeared "sometime
before the 4th edition."

ok schwarze@

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jan 17 21:29:14 2013 UTC (11 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.41: +2 -3 lines
Diff to previous 1.41 (colored)

remove uesless Pp;

Revision 1.41 / (download) - annotate - [select for diffs], Fri Jul 8 01:20:24 2011 UTC (12 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.40: +6 -4 lines
Diff to previous 1.40 (colored)

add support for -o to only print the match.
reminded this was useful by ajcoutot

Revision 1.40 / (download) - annotate - [select for diffs], Fri Mar 4 03:11:22 2011 UTC (13 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.39: +8 -4 lines
Diff to previous 1.39 (colored)

add -H (opposite of -h) to always print name. ok deraadt millert

Revision 1.39 / (download) - annotate - [select for diffs], Fri Sep 3 11:09:28 2010 UTC (13 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

add an EXIT STATUS section for /usr/bin;

Revision 1.38 / (download) - annotate - [select for diffs], Mon Apr 5 06:30:59 2010 UTC (14 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.37: +5 -5 lines
Diff to previous 1.37 (colored)

make this page read a little better;

Revision 1.37 / (download) - annotate - [select for diffs], Mon Apr 5 03:03:55 2010 UTC (14 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.36: +4 -22 lines
Diff to previous 1.36 (colored)

remove some non-POSIX standard non-GNU defacto standard options, mostly
relating to symlinks that you can get with find.  And a bonus fts flag fix.
With a small tweak by guenther.  ok deraadt guenther jmc millert nicm

Revision 1.36 / (download) - annotate - [select for diffs], Sun Feb 8 17:15:10 2009 UTC (15 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a few
updates to follow;

Revision 1.35 / (download) - annotate - [select for diffs], Thu May 31 19:20:10 2007 UTC (16 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

convert to new .Dd format;

Revision 1.34 / (download) - annotate - [select for diffs], Wed May 30 04:41:34 2007 UTC (16 years, 11 months ago) by jmc
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

- use a consistent text for STANDARDS
- note which options are extensions to POSIX

Revision 1.33 / (download) - annotate - [select for diffs], Tue Feb 13 21:48:20 2007 UTC (17 years, 3 months ago) by kili
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.32: +8 -2 lines
Diff to previous 1.32 (colored)


- Be explicit on command line checking, instead of relying on patterns,
  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@

Revision 1.32 / (download) - annotate - [select for diffs], Tue Mar 7 12:23:50 2006 UTC (18 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.31: +2 -3 lines
Diff to previous 1.31 (colored)

-nv is a valid combination; confirmed by otto

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jun 5 19:40:22 2005 UTC (18 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

s/-p1003.1-2003/-p1003.1-2004/g

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jan 6 00:28:53 2005 UTC (19 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.29: +9 -1 lines
Diff to previous 1.29 (colored)

clarify what -a does;
prod and ok deraadt@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Oct 4 21:34:17 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.28: +8 -41 lines
Diff to previous 1.28 (colored)

remove the section on extended regular expressions, and point
people instead to re_format.7: there is now a list of EREs there;

Revision 1.28 / (download) - annotate - [select for diffs], Tue Sep 28 21:08:47 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)

when stdin is searched, -L and -l print `(standard input)', not `-';

from alexander taler (pr #3937);

Revision 1.27 / (download) - annotate - [select for diffs], Tue Sep 28 20:51:15 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.26: +209 -126 lines
Diff to previous 1.26 (colored)

various fixes to make this page a bit clearer and hopefully a bit
more helpful;

this includes some ideas/fixes from otto and jared;

Revision 1.26 / (download) - annotate - [select for diffs], Sat Apr 17 20:10:55 2004 UTC (20 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

-w uses [[:<:]] and [[:>:]], not \< and \>,
and it's documented in re_format(7), not ex(1);

from jared yanovich;
ok beck@

Revision 1.25 / (download) - annotate - [select for diffs], Sat Apr 3 10:45:11 2004 UTC (20 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.24: +1 -3 lines
Diff to previous 1.24 (colored)

remove unnecessary .Sm macros (oops, this is my fault it ever
made it into the tree);

Revision 1.24 / (download) - annotate - [select for diffs], Fri Apr 2 18:40:09 2004 UTC (20 years, 1 month ago) by otto
Branch: MAIN
Changes since 1.23: +8 -1 lines
Diff to previous 1.23 (colored)

Document --line-buffered
ok jmc@

Revision 1.23 / (download) - annotate - [select for diffs], Mon Mar 15 08:54:27 2004 UTC (20 years, 2 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

simpler special character list.  provoked by Patrick Latifi ok jmc@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jan 19 16:26:03 2004 UTC (20 years, 4 months ago) by otto
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

-b reports offsets in bytes.

ok millert@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Dec 11 20:48:06 2003 UTC (20 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.20: +6 -1 lines
Diff to previous 1.20 (colored)

Document use of [pattern] without -e, give example of -v with multiple
patterns.

ok deraadt@ jmc@

Revision 1.20 / (download) - annotate - [select for diffs], Mon Oct 20 05:02:58 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

typos from Jared Yanovich;

Revision 1.19 / (download) - annotate - [select for diffs], Sat Sep 27 14:14:40 2003 UTC (20 years, 7 months ago) by mcbride
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Correct wording on -C option.

ok jmc@

Revision 1.18 / (download) - annotate - [select for diffs], Wed Aug 20 20:34:53 2003 UTC (20 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored)

Add curly braces {} to the list of special characters in egrep mode.
From Piotr Domagalski, closes PR 3405

Revision 1.17 / (download) - annotate - [select for diffs], Mon Aug 11 18:49:09 2003 UTC (20 years, 9 months ago) by tedu
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

typo, pr3396 from piotr domagalski

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jul 17 18:49:59 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

Make it clear what -C does w/o having to read the description of -A/-B.
Lack of clarity pointed out by Sam Smith, different fix suggested by jmc@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jul 15 10:56:24 2003 UTC (20 years, 10 months ago) by jmc
Branch: MAIN
Changes since 1.14: +4 -5 lines
Diff to previous 1.14 (colored)

- .Ql Li -> .Ql (Ql already provides literal font)
- remove a .Pp

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jul 10 19:16:22 2003 UTC (20 years, 10 months ago) by dhartmei
Branch: MAIN
Changes since 1.13: +2 -3 lines
Diff to previous 1.13 (colored)

restore grep -v semantics, print lines that don't match any (mismatch all)
patterns. ok tedu@, millert@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 24 04:43:53 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.12: +4 -7 lines
Diff to previous 1.12 (colored)

clarify operation of -f.  spotted by jmc@, new text by James Howard

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jun 23 18:14:33 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.11: +22 -1 lines
Diff to previous 1.11 (colored)

document two long options without short equivs.
ok and help jmc@

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 23 02:02:41 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

spelling

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jun 23 00:55:09 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.9: +7 -3 lines
Diff to previous 1.9 (colored)

better detetection/handling of binary files.
make -a do the right thing, doc and implement -U, -I.
add --help and --mmap for compatibility.
some other minor fixes.

some from NetBSD.  ok deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jun 22 22:42:00 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.8: +2 -6 lines
Diff to previous 1.8 (colored)

3 clause UCB license

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 22 22:38:50 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +1 -0 lines
Diff to previous 1.7 (colored)

proper $OpenBSD$

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jun 22 22:23:45 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +43 -32 lines
Diff to previous 1.6 (colored)

tweaks by jmc and i

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 22 22:20:07 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +223 -209 lines
Diff to previous 1.5 (colored)

freegrep 0.16

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jun 10 09:12:10 2003 UTC (20 years, 11 months ago) by jmc
Branch: MAIN
Changes since 1.4: +64 -56 lines
Diff to previous 1.4 (colored)

- section reorder
- COMPATIBILITY merge
- macro cleanup
- kill whitespace at EOL
- new sentence, new line

ssh pages ok markus@

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 25 14:53:03 2003 UTC (21 years ago) by jmc
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

add missing .El's for .Bl macros;

Revision 1.3 / (download) - annotate - [select for diffs], Mon Mar 31 19:40:44 2003 UTC (21 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

ascii -> ASCII

Revision 1.2 / (download) - annotate - [select for diffs], Sat Nov 9 02:22:33 2002 UTC (21 years, 6 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

more SEE ALSO fixes.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Sep 21 23:12:00 2001 UTC (22 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0

complete grep clone by harding@motd.ca; everything is there, but it is
slow because libc regexp is slow.  Anyone out there have the balls to sit
down and optimize libc regexp?

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.