diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2017-12-19 17:46:29 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2017-12-19 17:46:29 +0000 |
commit | 9adbdda3f4605e113aec5157f12f19002970d24a (patch) | |
tree | e5cefd860626fc3bd5e251f443c54a677e432320 /usr.bin/sed | |
parent | 62b1ec8a4f6d6fdaea666e732e6c65a5b1f0bce4 (diff) |
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 <at> zoho <dot> eu
OK jmc@
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/sed.1 | 32 |
1 files 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 <newline> (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 , |