19b50d902SRodney W. Grimes.\" Copyright (c) 1980, 1990, 1993 29b50d902SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 39b50d902SRodney W. Grimes.\" 49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions 69b50d902SRodney W. Grimes.\" are met: 79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 89b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 109b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 119b50d902SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 139b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 149b50d902SRodney W. Grimes.\" without specific prior written permission. 159b50d902SRodney W. Grimes.\" 169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 199b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 269b50d902SRodney W. Grimes.\" SUCH DAMAGE. 279b50d902SRodney W. Grimes.\" 28e18baae6SFernando Apesteguía.Dd June 23, 2020 299b50d902SRodney W. Grimes.Dt COLRM 1 3062500372SRuslan Ermilov.Os 319b50d902SRodney W. Grimes.Sh NAME 329b50d902SRodney W. Grimes.Nm colrm 339b50d902SRodney W. Grimes.Nd remove columns from a file 349b50d902SRodney W. Grimes.Sh SYNOPSIS 358fe908efSRuslan Ermilov.Nm 369b50d902SRodney W. Grimes.Op Ar start Op Ar stop 379b50d902SRodney W. Grimes.Sh DESCRIPTION 383898680cSPhilippe CharnierThe 393898680cSPhilippe Charnier.Nm 403898680cSPhilippe Charnierutility removes selected columns from the lines of a file. 419b50d902SRodney W. GrimesA column is defined as a single character in a line. 429b50d902SRodney W. GrimesInput is read from the standard input. 439b50d902SRodney W. GrimesOutput is written to the standard output. 449b50d902SRodney W. Grimes.Pp 459b50d902SRodney W. GrimesIf only the 469b50d902SRodney W. Grimes.Ar start 479b50d902SRodney W. Grimescolumn is specified, columns numbered less than the 489b50d902SRodney W. Grimes.Ar start 499b50d902SRodney W. Grimescolumn will be written. 509b50d902SRodney W. GrimesIf both 519b50d902SRodney W. Grimes.Ar start 529b50d902SRodney W. Grimesand 539b50d902SRodney W. Grimes.Ar stop 549b50d902SRodney W. Grimescolumns are specified, columns numbered less than the 559b50d902SRodney W. Grimes.Ar start 569b50d902SRodney W. Grimescolumn 579b50d902SRodney W. Grimesor greater than the 589b50d902SRodney W. Grimes.Ar stop 599b50d902SRodney W. Grimescolumn will be written. 609b50d902SRodney W. GrimesColumn numbering starts with one, not zero. 619b50d902SRodney W. Grimes.Pp 629b50d902SRodney W. GrimesTab characters increment the column count to the next multiple of eight. 639b50d902SRodney W. GrimesBackspace characters decrement the column count by one. 64da7214a9STim J. Robbins.Sh ENVIRONMENT 65da7214a9STim J. RobbinsThe 66da7214a9STim J. Robbins.Ev LANG , LC_ALL 67da7214a9STim J. Robbinsand 68da7214a9STim J. Robbins.Ev LC_CTYPE 69da7214a9STim J. Robbinsenvironment variables affect the execution of 70da7214a9STim J. Robbins.Nm 71da7214a9STim J. Robbinsas described in 72da7214a9STim J. Robbins.Xr environ 7 . 73a866e170SRuslan Ermilov.Sh EXIT STATUS 74da7214a9STim J. Robbins.Ex -std 75e18baae6SFernando Apesteguía.Sh EXAMPLES 76*c47514dbSMateusz PiotrowskiShow columns below 3 (c) and above 5 (e): 77e18baae6SFernando Apesteguía.Bd -literal -offset indent 78e18baae6SFernando Apesteguía$ echo -e "abcdefgh\en12345678" | colrm 3 5 79e18baae6SFernando Apesteguíaabfgh 80e18baae6SFernando Apesteguía12678 81e18baae6SFernando Apesteguía.Ed 82e18baae6SFernando Apesteguía.Pp 83e18baae6SFernando ApesteguíaSpecifying a start column bigger than the number of columns in the file is 84e18baae6SFernando Apesteguíaallowed and shows all the columns: 85e18baae6SFernando Apesteguía.Bd -literal -offset indent 86e18baae6SFernando Apesteguía$ echo "abcdefgh" | colrm 100 87e18baae6SFernando Apesteguíaabcdefgh 88e18baae6SFernando Apesteguía.Ed 89e18baae6SFernando Apesteguía.Pp 90e18baae6SFernando ApesteguíaUsing 1 as start column will show nothing: 91e18baae6SFernando Apesteguía.Bd -literal -offset indent 92e18baae6SFernando Apesteguía$ echo "abcdefgh" | colrm 1 93e18baae6SFernando Apesteguía 94e18baae6SFernando Apesteguía.Ed 959b50d902SRodney W. Grimes.Sh SEE ALSO 969b50d902SRodney W. Grimes.Xr awk 1 , 979b50d902SRodney W. Grimes.Xr column 1 , 989b50d902SRodney W. Grimes.Xr cut 1 , 999b50d902SRodney W. Grimes.Xr paste 1 1009b50d902SRodney W. Grimes.Sh HISTORY 1019b50d902SRodney W. GrimesThe 1028fe908efSRuslan Ermilov.Nm 1038b912b6cSBaptiste Daroussinutility first appeared in 1048b912b6cSBaptiste Daroussin.Bx 1 . 1058b912b6cSBaptiste Daroussin.Sh AUTHORS 1068b912b6cSBaptiste Daroussin.An Jeff Schriebman 1078b912b6cSBaptiste Daroussinwrote the original version of 1088b912b6cSBaptiste Daroussin.Nm 1098b912b6cSBaptiste Daroussinin November 1974. 110