From f826ebbd1da97f09a3d2eca715c3cff5b388a317 Mon Sep 17 00:00:00 2001 From: martijn Date: Tue, 19 Dec 2017 17:46:28 +0000 Subject: [PATCH] Remove EXAMPLES section. The example itself was taken directly from the POSIX specification by jmc@, who doesn't remember adding it. This example isn't very clear about what it actually does, so just remove it. If someone can come up with one or more examples that give a more clear introduction to the workings of sed feel free to send them in. Prompted by a diff by kshe59 zoho eu OK jmc@ --- usr.bin/sed/sed.1 | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1 index fa257d8ae95..22b7df38eda 100644 --- a/usr.bin/sed/sed.1 +++ b/usr.bin/sed/sed.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sed.1,v 1.53 2017/12/11 13:25:57 martijn Exp $ +.\" $OpenBSD: sed.1,v 1.54 2017/12/19 17:46:28 martijn Exp $ .\" .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" from: @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" -.Dd $Mdocdate: December 11 2017 $ +.Dd $Mdocdate: December 19 2017 $ .Dt SED 1 .Os .Sh NAME @@ -541,34 +541,6 @@ defaults to the terminal width, or 80 columns if the output is not a terminal. .El .Sh EXIT STATUS .Ex -std sed -.Sh EXAMPLES -The following simulates the -.Xr cat 1 -.Fl s -command, -squeezing excess empty lines from standard input: -.Bd -literal -offset indent -$ sed -n ' -# Write non-empty lines. -/./ { - p - d - } -# Write a single empty line, then look for more empty lines. -/^$/ p -# Get the next line, discard the held (empty line), -# and look for more empty lines. -:Empty -/^$/ { - N - s/.// - b Empty - } -# Write the non-empty line before going back to search -# for the first in a set of empty lines. - p -\&' -.Ed .Sh SEE ALSO .Xr awk 1 , .Xr ed 1 , -- 2.20.1