grep.1 (210426) | grep.1 (210578) |
---|---|
1.\" $FreeBSD: head/usr.bin/grep/grep.1 210426 2010-07-23 17:42:42Z gabor $ | 1.\" $FreeBSD: head/usr.bin/grep/grep.1 210578 2010-07-29 00:11:14Z gabor $ |
2.\" $OpenBSD: grep.1,v 1.38 2010/04/05 06:30:59 jmc Exp $ 3.\" Copyright (c) 1980, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)grep.1 8.3 (Berkeley) 4/18/94 31.\" | 2.\" $OpenBSD: grep.1,v 1.38 2010/04/05 06:30:59 jmc Exp $ 3.\" Copyright (c) 1980, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)grep.1 8.3 (Berkeley) 4/18/94 31.\" |
32.Dd September 19, 2009 | 32.Dd July 28, 2010 |
33.Dt GREP 1 34.Os 35.Sh NAME 36.Nm grep , egrep , fgrep , 37.Nm zgrep , zegrep , zfgrep 38.Nd file pattern searcher 39.Sh SYNOPSIS 40.Nm grep --- 140 unchanged lines hidden (view full) --- 181Specify a pattern used during the search of the input: 182an input line is selected if it matches any of the specified patterns. 183This option is most useful when multiple 184.Fl e 185options are used to specify multiple patterns, 186or when a pattern begins with a dash 187.Pq Sq - . 188.It Fl Fl exclude | 33.Dt GREP 1 34.Os 35.Sh NAME 36.Nm grep , egrep , fgrep , 37.Nm zgrep , zegrep , zfgrep 38.Nd file pattern searcher 39.Sh SYNOPSIS 40.Nm grep --- 140 unchanged lines hidden (view full) --- 181Specify a pattern used during the search of the input: 182an input line is selected if it matches any of the specified patterns. 183This option is most useful when multiple 184.Fl e 185options are used to specify multiple patterns, 186or when a pattern begins with a dash 187.Pq Sq - . 188.It Fl Fl exclude |
189If 190.Fl R 191is specified, it excludes files matching the given 192filename pattern. | 189If specified, it excludes files matching the given 190filename pattern from the search. 191Note that 192.Fl Fl exclude 193patterns take priority over 194.Fl Fl include 195patterns, and if no 196.Fl Fl include 197pattern is specified, all files are searched that are 198not excluded. 199Patterns are matched to the full path specified, 200not only to the filename component. |
193.It Fl Fl exclude-dir 194If 195.Fl R 196is specified, it excludes directories matching the | 201.It Fl Fl exclude-dir 202If 203.Fl R 204is specified, it excludes directories matching the |
197given filename pattern. | 205given filename pattern from the search. 206Note that 207.Fl Fl exclude-dir 208patterns take priority over 209.Fl Fl include-dir 210patterns, and if no 211.Fl Fl include-dir 212pattern is specified, all directories are searched that are 213not excluded. |
198.It Fl F , Fl Fl fixed-strings 199Interpret 200.Ar pattern 201as a set of fixed strings 202(i.e. force 203.Nm grep 204to behave as 205.Nm fgrep ) . --- 27 unchanged lines hidden (view full) --- 233.Fl Fl binary-file Ns = Ns Ar without-match 234option. 235.It Fl i , Fl Fl ignore-case 236Perform case insensitive matching. 237By default, 238.Nm grep 239is case sensitive. 240.It Fl Fl include | 214.It Fl F , Fl Fl fixed-strings 215Interpret 216.Ar pattern 217as a set of fixed strings 218(i.e. force 219.Nm grep 220to behave as 221.Nm fgrep ) . --- 27 unchanged lines hidden (view full) --- 249.Fl Fl binary-file Ns = Ns Ar without-match 250option. 251.It Fl i , Fl Fl ignore-case 252Perform case insensitive matching. 253By default, 254.Nm grep 255is case sensitive. 256.It Fl Fl include |
241If 242.Fl R 243is specified, it includes the files matching the 244given filename pattern. | 257If specified, only files matching the 258given filename pattern are searched. 259Note that 260.Fl Fl exclude 261patterns take priority over 262.Fl Fl include 263patterns. 264Patterns are matched to the full path specified, 265not only to the filename component. |
245.It Fl Fl include-dir 246If 247.Fl R | 266.It Fl Fl include-dir 267If 268.Fl R |
248is specified, it includes the directories matching the 249given filename pattern. | 269is specified, only directories matching the 270given filename pattern are searched. 271Note that 272.Fl Fl exclude-dir 273patterns take priority over 274.Fl Fl include-dir 275patterns. |
250.It Fl J, Fl Fl bz2decompress 251Decompress the 252.Xr bzip2 1 253compressed file before looking for the text. 254.It Fl L , Fl Fl files-without-match 255Only the names of files not containing selected lines are written to 256standard output. 257Pathnames are listed once per file searched. --- 204 unchanged lines hidden --- | 276.It Fl J, Fl Fl bz2decompress 277Decompress the 278.Xr bzip2 1 279compressed file before looking for the text. 280.It Fl L , Fl Fl files-without-match 281Only the names of files not containing selected lines are written to 282standard output. 283Pathnames are listed once per file searched. --- 204 unchanged lines hidden --- |