Print this page
3737 grep does not support -H option
3759 egrep(1) and fgrep(1) -s flag does not hide -c output
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Andy Stormont <andyjstormont@gmail.com>
*** 7,50 ****
.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
.\" This notice shall appear on any product containing this material.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
! .TH FGREP 1 "Mar 24, 2006"
.SH NAME
fgrep \- search a file for a fixed-character string
.SH SYNOPSIS
.LP
.nf
! \fB/usr/bin/fgrep\fR [\fB-bchilnsvx\fR] \fB-e\fR \fIpattern_list\fR [\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/bin/fgrep\fR [\fB-bchilnsvx\fR] \fB-f\fR \fIfile\fR [\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/bin/fgrep\fR [\fB-bchilnsvx\fR] \fIpattern\fR [\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/xpg4/bin/fgrep\fR [\fB-bchilnqsvx\fR] \fB-e\fR \fIpattern_list\fR [\fB-f\fR \fIfile\fR]
[\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/xpg4/bin/fgrep\fR [\fB-bchilnqsvx\fR] [\fB-e\fR \fIpattern_list\fR] \fB-f\fR \fIfile\fR
[\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/xpg4/bin/fgrep\fR [\fB-bchilnqsvx\fR] \fIpattern\fR [\fIfile...\fR]
.fi
.SH DESCRIPTION
.sp
.LP
--- 7,50 ----
.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
.\" This notice shall appear on any product containing this material.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
! .TH FGREP 1 "May 3, 2013"
.SH NAME
fgrep \- search a file for a fixed-character string
.SH SYNOPSIS
.LP
.nf
! \fB/usr/bin/fgrep\fR [\fB-bcHhilnqsvx\fR] \fB-e\fR \fIpattern_list\fR [\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/bin/fgrep\fR [\fB-bcHhilnqsvx\fR] \fB-f\fR \fIfile\fR [\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/bin/fgrep\fR [\fB-bcHhilnqsvx\fR] \fIpattern\fR [\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/xpg4/bin/fgrep\fR [\fB-bcHhilnqsvx\fR] \fB-e\fR \fIpattern_list\fR [\fB-f\fR \fIfile\fR]
[\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/xpg4/bin/fgrep\fR [\fB-bcHhilnqsvx\fR] [\fB-e\fR \fIpattern_list\fR] \fB-f\fR \fIfile\fR
[\fIfile...\fR]
.fi
.LP
.nf
! \fB/usr/xpg4/bin/fgrep\fR [\fB-bcHhilnqsvx\fR] \fIpattern\fR [\fIfile...\fR]
.fi
.SH DESCRIPTION
.sp
.LP
*** 109,118 ****
--- 109,127 ----
.RE
.sp
.ne 2
.na
+ \fB\fB-H\fR\fR
+ .ad
+ .RS 19n
+ Precedes each line by the name of the file containing the matching line.
+ .RE
+
+ .sp
+ .ne 2
+ .na
\fB\fB-h\fR\fR
.ad
.RS 19n
Suppresses printing of files when searching multiple files.
.RE
*** 146,192 ****
.RE
.sp
.ne 2
.na
! \fB\fB-s\fR\fR
.ad
.RS 19n
! Works silently, that is, displays nothing except error messages. This is useful
! for checking the error status.
.RE
.sp
.ne 2
.na
! \fB\fB-v\fR\fR
.ad
.RS 19n
! Prints all lines except those that contain the pattern.
.RE
.sp
.ne 2
.na
! \fB\fB-x\fR\fR
.ad
.RS 19n
! Prints only lines that are matched entirely.
.RE
- .SS "/usr/xpg4/bin/fgrep"
.sp
- .LP
- The following options are supported for \fB/usr/xpg4/bin/fgrep\fR only:
- .sp
.ne 2
.na
! \fB\fB-q\fR\fR
.ad
! .RS 6n
! Quiet. Does not write anything to the standard output, regardless of matching
! lines. Exits with zero status if an input line is selected.
.RE
.SH OPERANDS
.sp
.LP
--- 155,196 ----
.RE
.sp
.ne 2
.na
! \fB\fB-q\fR\fR
.ad
.RS 19n
! Quiet. Does not write anything to the standard output, regardless of matching
! lines. Exits with zero status if an input line is selected.
.RE
.sp
.ne 2
.na
! \fB\fB-s\fR\fR
.ad
.RS 19n
! Legacy equivalent of \fB-q\fR.
.RE
.sp
.ne 2
.na
! \fB\fB-v\fR\fR
.ad
.RS 19n
! Prints all lines except those that contain the pattern.
.RE
.sp
.ne 2
.na
! \fB\fB-x\fR\fR
.ad
! .RS 19n
! Prints only lines that are matched entirely.
.RE
.SH OPERANDS
.sp
.LP