grep.1 (7847e04111f2c2b06b36f6d19a46d78814d7836d) | grep.1 (88d241831d991f7c79242bf0bfe034541d373951) |
---|---|
1.\" $NetBSD: grep.1,v 1.2 2011/02/16 01:31:33 joerg Exp $ 2.\" $FreeBSD$ 3.\" $OpenBSD: grep.1,v 1.38 2010/04/05 06:30:59 jmc Exp $ 4.\" Copyright (c) 1980, 1990, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)grep.1 8.3 (Berkeley) 4/18/94 32.\" | 1.\" $NetBSD: grep.1,v 1.2 2011/02/16 01:31:33 joerg Exp $ 2.\" $FreeBSD$ 3.\" $OpenBSD: grep.1,v 1.38 2010/04/05 06:30:59 jmc Exp $ 4.\" Copyright (c) 1980, 1990, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)grep.1 8.3 (Berkeley) 4/18/94 32.\" |
33.Dd August 21, 2018 | 33.Dd August 7, 2020 |
34.Dt GREP 1 35.Os 36.Sh NAME 37.Nm grep , 38.Nm egrep , 39.Nm fgrep , 40.Nm rgrep 41.Nd file pattern searcher --- 162 unchanged lines hidden (view full) --- 204filename 205.Ar pattern 206from the search. 207Note that 208.Fl Fl exclude 209and 210.Fl Fl include 211patterns are processed in the order given. | 34.Dt GREP 1 35.Os 36.Sh NAME 37.Nm grep , 38.Nm egrep , 39.Nm fgrep , 40.Nm rgrep 41.Nd file pattern searcher --- 162 unchanged lines hidden (view full) --- 204filename 205.Ar pattern 206from the search. 207Note that 208.Fl Fl exclude 209and 210.Fl Fl include 211patterns are processed in the order given. |
212If a name patches multiple patterns, the latest matching rule wins. | 212If a name matches multiple patterns, the latest matching rule wins. |
213If no 214.Fl Fl include 215pattern is specified, all files are searched that are 216not excluded. 217Patterns are matched to the full path specified, 218not only to the filename component. 219.It Fl Fl exclude-dir Ar pattern 220If 221.Fl R 222is specified, it excludes directories matching the 223given filename 224.Ar pattern 225from the search. 226Note that 227.Fl Fl exclude-dir 228and 229.Fl Fl include-dir 230patterns are processed in the order given. | 213If no 214.Fl Fl include 215pattern is specified, all files are searched that are 216not excluded. 217Patterns are matched to the full path specified, 218not only to the filename component. 219.It Fl Fl exclude-dir Ar pattern 220If 221.Fl R 222is specified, it excludes directories matching the 223given filename 224.Ar pattern 225from the search. 226Note that 227.Fl Fl exclude-dir 228and 229.Fl Fl include-dir 230patterns are processed in the order given. |
231If a name patches multiple patterns, the latest matching rule wins. | 231If a name matches multiple patterns, the latest matching rule wins. |
232If no 233.Fl Fl include-dir 234pattern is specified, all directories are searched that are 235not excluded. 236.It Fl F , Fl Fl fixed-strings 237Interpret 238.Ar pattern 239as a set of fixed strings --- 39 unchanged lines hidden (view full) --- 279If specified, only files matching the given filename 280.Ar pattern 281are searched. 282Note that 283.Fl Fl include 284and 285.Fl Fl exclude 286patterns are processed in the order given. | 232If no 233.Fl Fl include-dir 234pattern is specified, all directories are searched that are 235not excluded. 236.It Fl F , Fl Fl fixed-strings 237Interpret 238.Ar pattern 239as a set of fixed strings --- 39 unchanged lines hidden (view full) --- 279If specified, only files matching the given filename 280.Ar pattern 281are searched. 282Note that 283.Fl Fl include 284and 285.Fl Fl exclude 286patterns are processed in the order given. |
287If a name patches multiple patterns, the latest matching rule wins. | 287If a name matches multiple patterns, the latest matching rule wins. |
288Patterns are matched to the full path specified, 289not only to the filename component. 290.It Fl Fl include-dir Ar pattern 291If 292.Fl R 293is specified, only directories matching the given filename 294.Ar pattern 295are searched. 296Note that 297.Fl Fl include-dir 298and 299.Fl Fl exclude-dir 300patterns are processed in the order given. | 288Patterns are matched to the full path specified, 289not only to the filename component. 290.It Fl Fl include-dir Ar pattern 291If 292.Fl R 293is specified, only directories matching the given filename 294.Ar pattern 295are searched. 296Note that 297.Fl Fl include-dir 298and 299.Fl Fl exclude-dir 300patterns are processed in the order given. |
301If a name patches multiple patterns, the latest matching rule wins. | 301If a name matches multiple patterns, the latest matching rule wins. |
302.It Fl L , Fl Fl files-without-match 303Only the names of files not containing selected lines are written to 304standard output. 305Pathnames are listed once per file searched. 306If the standard input is searched, the string 307.Dq (standard input) 308is written unless a 309.Fl Fl label --- 221 unchanged lines hidden --- | 302.It Fl L , Fl Fl files-without-match 303Only the names of files not containing selected lines are written to 304standard output. 305Pathnames are listed once per file searched. 306If the standard input is searched, the string 307.Dq (standard input) 308is written unless a 309.Fl Fl label --- 221 unchanged lines hidden --- |