From owner-dev-commits-src-all@freebsd.org Tue Dec 29 18:55:23 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D64A4C81E1; Tue, 29 Dec 2020 18:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D53Wv3frFz3F6p; Tue, 29 Dec 2020 18:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7080710CF4; Tue, 29 Dec 2020 18:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTItNnW089543; Tue, 29 Dec 2020 18:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTItNQ2089542; Tue, 29 Dec 2020 18:55:23 GMT (envelope-from git) Date: Tue, 29 Dec 2020 18:55:23 GMT Message-Id: <202012291855.0BTItNQ2089542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: f3f16c31fea2 - main - look(1): Add EXAMPLES section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3f16c31fea258b2b1ec51ddd1bceb6207b66198 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 18:55:23 -0000 The branch main has been updated by fernape (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f3f16c31fea258b2b1ec51ddd1bceb6207b66198 commit f3f16c31fea258b2b1ec51ddd1bceb6207b66198 Author: Fernando Apesteguía AuthorDate: 2020-12-29 20:48:12 +0000 Commit: Fernando Apesteguía CommitDate: 2020-12-29 20:48:12 +0000 look(1): Add EXAMPLES section Add two simple examples. In this case I opted to show a small portion of the output since it helps to understand what the tool does. It shows the use of the -t flag too. PR: Submitted by: Reported by: Reviewed by: gbe@ Approved by: manpages (bcr@) Obtained from: MFC after: MFH: Relnotes: Security: Sponsored by: Differential Revision: https://reviews.freebsd.org/D27543 --- usr.bin/look/look.1 | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/usr.bin/look/look.1 b/usr.bin/look/look.1 index b2f7100da530..177306e4eb09 100644 --- a/usr.bin/look/look.1 +++ b/usr.bin/look/look.1 @@ -28,7 +28,7 @@ .\" @(#)look.1 8.1 (Berkeley) 6/14/93 .\" $FreeBSD$ .\" -.Dd July 17, 2004 +.Dd December 29, 2020 .Dt LOOK 1 .Os .Sh NAME @@ -96,6 +96,35 @@ The .Nm utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. +.Sh EXAMPLES +Look for lines starting with +.Ql xylene +in the file +.Pa /usr/share/dict/words : +.Bd -literal -offset indent +$ look xylen +xylene +xylenol +xylenyl +.Ed +.Pp +Same as above, but do not consider any characters in +.Ar string +beyond the first +.Ql e . +Note that +.Fl f +is implicit since we are searching the default file +.Pa /usr/share/dict/words : +.Bd -literal -offset indent +$ look -t e xylen +Xyleborus +xylem +xylene +xylenol +xylenyl +xyletic +.Ed .Sh COMPATIBILITY The original manual page stated that tabs and blank characters participated in comparisons when the