Date: Mon, 27 Jul 2020 16:51:23 +0000 (UTC) From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= <fernape@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363620 - head/usr.bin/comm Message-ID: <202007271651.06RGpNcK064987@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fernape (ports committer) Date: Mon Jul 27 16:51:23 2020 New Revision: 363620 URL: https://svnweb.freebsd.org/changeset/base/363620 Log: comm(1): Add EXAMPLES section Add two very simple examples. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D25344 Modified: head/usr.bin/comm/comm.1 Modified: head/usr.bin/comm/comm.1 ============================================================================== --- head/usr.bin/comm/comm.1 Mon Jul 27 16:37:18 2020 (r363619) +++ head/usr.bin/comm/comm.1 Mon Jul 27 16:51:23 2020 (r363620) @@ -31,7 +31,7 @@ .\" From: @(#)comm.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 12, 2009 +.Dd July 27, 2020 .Dt COMM 1 .Os .Sh NAME @@ -95,6 +95,35 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Assuming a file named +.Pa example.txt +with the following contents: +.Bd -literal -offset indent +a +b +c +d +.Ed +.Pp +Show lines only in +.Pa example.txt , +lines only in stdin and common lines: +.Bd -literal -offset indent +$ echo -e "B\enc" | comm example.txt - + B +a +b + c +d +.Ed +.Pp +Show only common lines doing case insensitive comparisons: +.Bd -literal -offset indent +$ echo -e "B\enc" | comm -1 -2 -i example.txt - +b +c +.Ed .Sh SEE ALSO .Xr cmp 1 , .Xr diff 1 , @@ -108,9 +137,7 @@ utility conforms to .Pp The .Fl i -option is an extension to the -.Tn POSIX -standard. +option is an extension to the POSIX standard. .Sh HISTORY A .Nm
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007271651.06RGpNcK064987>