summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-06-28 14:49:26 +0000
committerschwarze <schwarze@openbsd.org>2017-06-28 14:49:26 +0000
commitbed15beb5859d80e72ca75fac4a841a7fd239c6a (patch)
tree875d378636e465e1741a597c906d9c5378d28657
parentStop trying to clean up addresses, routes and "-L" file (diff)
downloadwireguard-openbsd-bed15beb5859d80e72ca75fac4a841a7fd239c6a.tar.xz
wireguard-openbsd-bed15beb5859d80e72ca75fac4a841a7fd239c6a.zip
Remove the nonsensical "-s - -" in the third example; quirk reported
by Redouan Ait Mallouk <raitmallouk at gmail dot com>. The paste(1) utility allows two equivalent solutions for many tasks involving only one input stream; while here, make that more obvious by always showing both solutions.
-rw-r--r--usr.bin/paste/paste.122
1 files changed, 14 insertions, 8 deletions
diff --git a/usr.bin/paste/paste.1 b/usr.bin/paste/paste.1
index fbf64ae94f0..8f575fbd455 100644
--- a/usr.bin/paste/paste.1
+++ b/usr.bin/paste/paste.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: paste.1,v 1.14 2010/09/03 11:09:29 jmc Exp $
+.\" $OpenBSD: paste.1,v 1.15 2017/06/28 14:49:26 schwarze Exp $
.\"
.\" Copyright (c) 1989, 1990 The Regents of the University of California.
.\" All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" from: @(#)paste.1 5.6 (Berkeley) 7/27/91
.\"
-.Dd $Mdocdate: September 3 2010 $
+.Dd $Mdocdate: June 28 2017 $
.Dt PASTE 1
.Os
.Sh NAME
@@ -111,21 +111,27 @@ for each instance of
.Ex -std paste
.Sh EXAMPLES
List the files in the current directory in three columns:
-.Pp
-.Dl "$ ls | paste - - -"
+.Bd -literal -offset indent
+$ ls | paste - - -
+$ ls | paste -s -d '\et\et\en' -
+.Ed
.Pp
Combine pairs of lines from
.Ar file
into single lines:
-.Pp
-.Dl "$ paste -s -d '\et\en' file"
+.Bd -literal -offset indent
+$ paste - - < file
+$ paste -s -d '\et\en' file
+.Ed
.Pp
Number the lines in
.Ar file ,
similar to
.Ql cat -n :
-.Pp
-.Dl "$ sed = file | paste -s -d '\et\en' - -"
+.Bd -literal -offset indent
+$ sed = file | paste - -
+$ sed = file | paste -s -d '\et\en' -
+.Ed
.Pp
Create a colon-separated list of directories named
.Pa bin ,