summaryrefslogtreecommitdiff
path: root/usr.bin/colrm
diff options
context:
space:
mode:
authorFernando ApesteguĂ­a <fernape@FreeBSD.org>2020-06-23 10:15:08 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2020-06-23 10:15:08 +0000
commite18baae63f28822ee097c2ae21e535e8c993c370 (patch)
tree6ff351dd49e9a1272ed769b01c4cb0d003448387 /usr.bin/colrm
parentfcc879ad25caaeed3ef9d461d3ed798b51312062 (diff)
downloadsrc-test2-e18baae63f28822ee097c2ae21e535e8c993c370.tar.gz
src-test2-e18baae63f28822ee097c2ae21e535e8c993c370.zip
colrm(1): Add EXAMPLES section
Add a couple of simple examples Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25196
Notes
Notes: svn path=/head/; revision=362535
Diffstat (limited to 'usr.bin/colrm')
-rw-r--r--usr.bin/colrm/colrm.122
1 files changed, 21 insertions, 1 deletions
diff --git a/usr.bin/colrm/colrm.1 b/usr.bin/colrm/colrm.1
index 809f026c8d44..6d0e02238a98 100644
--- a/usr.bin/colrm/colrm.1
+++ b/usr.bin/colrm/colrm.1
@@ -28,7 +28,7 @@
.\" @(#)colrm.1 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
-.Dd June 6, 2015
+.Dd June 23, 2020
.Dt COLRM 1
.Os
.Sh NAME
@@ -75,6 +75,26 @@ as described in
.Xr environ 7 .
.Sh EXIT STATUS
.Ex -std
+.Sh EXAMPLES
+Show columns below 3 (c) and above 5 (e)
+.Bd -literal -offset indent
+$ echo -e "abcdefgh\en12345678" | colrm 3 5
+abfgh
+12678
+.Ed
+.Pp
+Specifying a start column bigger than the number of columns in the file is
+allowed and shows all the columns:
+.Bd -literal -offset indent
+$ echo "abcdefgh" | colrm 100
+abcdefgh
+.Ed
+.Pp
+Using 1 as start column will show nothing:
+.Bd -literal -offset indent
+$ echo "abcdefgh" | colrm 1
+
+.Ed
.Sh SEE ALSO
.Xr awk 1 ,
.Xr column 1 ,