From owner-svn-src-all@freebsd.org Tue Jun 23 07:48:49 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 2463A34CC45; Tue, 23 Jun 2020 07:48:49 +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 49rdh106kVz49Cj; Tue, 23 Jun 2020 07:48:49 +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 F384B1C9ED; Tue, 23 Jun 2020 07:48:48 +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 05N7mmru028967; Tue, 23 Jun 2020 07:48:48 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N7mmae028966; Tue, 23 Jun 2020 07:48:48 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006230748.05N7mmae028966@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: Tue, 23 Jun 2020 07:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362533 - head/usr.bin/hexdump X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/hexdump X-SVN-Commit-Revision: 362533 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: Tue, 23 Jun 2020 07:48:49 -0000 Author: fernape (ports committer) Date: Tue Jun 23 07:48:48 2020 New Revision: 362533 URL: https://svnweb.freebsd.org/changeset/base/362533 Log: od(1): Add EXAMPLES section * Add two small examples showing the use of -a, -c, -j and -N * While here, remove obsolete .Tn reported by mandoc(1) Approved by: 0mp@ Differential Revision: https://reviews.freebsd.org/D25372 Modified: head/usr.bin/hexdump/od.1 Modified: head/usr.bin/hexdump/od.1 ============================================================================== --- head/usr.bin/hexdump/od.1 Tue Jun 23 07:33:29 2020 (r362532) +++ head/usr.bin/hexdump/od.1 Tue Jun 23 07:48:48 2020 (r362533) @@ -143,7 +143,7 @@ is a string containing one or more of the following ki .Bl -tag -width indent .It Cm a Named characters -.Pq Tn ASCII . +.Pq ASCII . Control characters are displayed using the following names: .Bl -column "000 NUL" "001 SOH" "002 STX" "003 ETX" "004 EOT" "005 ENQ" .It "000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ" @@ -243,6 +243,24 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Dump stdin and show the output using named characters and C-style escaped +characters: +.Bd -literal -offset indent +$ echo "FreeBSD: The power to serve" | od -a -c +0000000 F r e e B S D : sp T h e sp p o w + F r e e B S D : T h e p o w +0000020 e r sp t o sp s e r v e nl + e r t o s e r v e \en +0000034 +.Ed +.Pp +Dump stdin skipping the first 13 bytes using named characters and dumping no +more than 5 bytes: +.Bd -literal -offset indent +$ echo "FreeBSD: The power to serve" | od -An -a -j 13 -N 5 + p o w e r +.Ed .Sh COMPATIBILITY The traditional .Fl s