git: 3cb2a7e01e13 - main - sed.1: Adjust examples to fit in one line + SPDX
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Jul 2025 19:20:14 UTC
The branch main has been updated by ziaee:
URL: https://cgit.FreeBSD.org/src/commit/?id=3cb2a7e01e13c866d7c4bb55da8f229233c0cd7c
commit 3cb2a7e01e13c866d7c4bb55da8f229233c0cd7c
Author: Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-06-15 02:51:05 +0000
Commit: Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-07-15 19:20:11 +0000
sed.1: Adjust examples to fit in one line + SPDX
Examples were previously overflowing at MANWIDTH 80. Keep the same
complexity but use shorter phrases to make them easier to read. Tag
SPDX while here.
MFC after: 3 days
Reviewed by: bcr
Discussed with: emaste
Differential Revision: https://reviews.freebsd.org/D50867
---
usr.bin/sed/sed.1 | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1
index 345f673310d8..5fd894eaf78b 100644
--- a/usr.bin/sed/sed.1
+++ b/usr.bin/sed/sed.1
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -28,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 17, 2024
+.Dd June 14, 2025
.Dt SED 1
.Os
.Sh NAME
@@ -597,17 +600,17 @@ with
.Ql baz
when piped from another command:
.Bd -literal -offset indent
-echo "An alternate word, like bar, is sometimes used in examples." | sed 's/bar/baz/'
+echo "use bar in examples" | sed 's/bar/baz/'
.Ed
.Pp
Using backlashes can sometimes be hard to read and follow:
.Bd -literal -offset indent
-echo "/home/example" | sed 's/\\/home\\/example/\\/usr\\/local\\/example/'
+echo "/bin/bash" | sed 's/\\/bin\\/bash/\\/bin\\/sh/'
.Ed
.Pp
Using a different separator can be handy when working with paths:
.Bd -literal -offset indent
-echo "/home/example" | sed 's#/home/example#/usr/local/example#'
+echo "/bin/bash" | sed 's#/bin/bash#/bin/sh#'
.Ed
.Pp
Replace all occurrences of