From owner-svn-src-all@freebsd.org Sat Oct 24 16:40:34 2020 Return-Path: Delivered-To: svn-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 C791644E605; Sat, 24 Oct 2020 16:40:34 +0000 (UTC) (envelope-from fernape@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 4CJRfp4xj8z3XWR; Sat, 24 Oct 2020 16:40:34 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D0951B5B3; Sat, 24 Oct 2020 16:40:34 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09OGeYIi007229; Sat, 24 Oct 2020 16:40:34 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09OGeYfp007228; Sat, 24 Oct 2020 16:40:34 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202010241640.09OGeYfp007228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Sat, 24 Oct 2020 16:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367011 - head/usr.bin/getent X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/getent X-SVN-Commit-Revision: 367011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Oct 2020 16:40:34 -0000 Author: fernape (ports committer) Date: Sat Oct 24 16:40:34 2020 New Revision: 367011 URL: https://svnweb.freebsd.org/changeset/base/367011 Log: getent(1): Add EXAMPLES section Add 3 small examples to the EXAMPLES section. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D26866 Modified: head/usr.bin/getent/getent.1 Modified: head/usr.bin/getent/getent.1 ============================================================================== --- head/usr.bin/getent/getent.1 Sat Oct 24 16:25:52 2020 (r367010) +++ head/usr.bin/getent/getent.1 Sat Oct 24 16:40:34 2020 (r367011) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 4, 2016 +.Dd October 24, 2020 .Dt GETENT 1 .Os .Sh NAME @@ -103,6 +103,24 @@ utility exits 0 on success, .Ar database , or 3 if there is no support for enumeration on .Ar database . +.Sh EXAMPLES +Show entry for user sshd from the passwd database: +.Bd -literal -offset indent +$ getent passwd sshd +sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin +.Ed +.Pp +Show entry for TCP from the protocols database: +.Bd -literal -offset indent +$ getent protocols tcp +tcp 6 TCP +.Ed +.Pp +Show entry for the localhost IPv6 address ::1 from the hosts database: +.Bd -literal -offset indent +$ getent hosts ::1 +::1 localhost localhost.my.domain +.Ed .Sh SEE ALSO .Xr getutxent 3 , .Xr ethers 5 , @@ -123,7 +141,4 @@ command appeared in .Nx 3.0 , and was imported into .Fx 7.0 . -It was based on the command of the same name in -.Tn Solaris -and -.Tn Linux . +It was based on the command of the same name in Solaris and Linux.