Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

colrm(1) [linux man page]

COLRM(1)						    BSD General Commands Manual 						  COLRM(1)

NAME
colrm -- remove columns from a file SYNOPSIS
colrm [start [stop]] DESCRIPTION
The colrm utility removes selected columns from the lines of a file. A column is defined as a single character in a line. Input is read from the standard input. Output is written to the standard output. If only the start column is specified, columns numbered less than the start column will be written. If both start and stop columns are spec- ified, columns numbered less than the start column or greater than the stop column will be written. Column numbering starts with one, not zero. Tab characters increment the column count to the next multiple of eight. Backspace characters decrement the column count by one. ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of colrm as described in environ(7). EXIT STATUS
The colrm utility exits 0 on success, and >0 if an error occurs. SEE ALSO
awk(1), column(1), cut(1), paste(1) HISTORY
The colrm command appeared in 3.0BSD. BSD
August 4, 2004 BSD

Check Out this Related Man Page

COLRM(1)						    BSD General Commands Manual 						  COLRM(1)

NAME
colrm -- remove columns from a file SYNOPSIS
colrm [start [stop]] DESCRIPTION
The colrm utility removes selected columns from the lines of a file. A column is defined as a single character in a line. Input is read from the standard input. Output is written to the standard output. If only the start column is specified, columns numbered less than the start column will be written. If both start and stop columns are spec- ified, columns numbered less than the start column or greater than the stop column will be written. Column numbering starts with one, not zero. Tab characters increment the column count to the next multiple of eight. Backspace characters decrement the column count by one. ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of colrm as described in environ(7). EXIT STATUS
The colrm utility exits 0 on success, and >0 if an error occurs. SEE ALSO
awk(1), column(1), cut(1), paste(1) HISTORY
The colrm command appeared in 3.0BSD. BSD
August 4, 2004 BSD
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

can awk print column using a variable ??

i want to print the column file using awk or cut in dynamic manner like trmp=2;temp1=1;temp3=2 awk 'BEGIN{OFS=IFS="\t"} {print $temp,$temp1,$temp3}' client_data.txt or cut -f $temp1,$temp2,$temp3 -d"\t" file_name . but it is showing error , In awk can i use variable as in printing... (36 Replies)
Discussion started by: jambesh
36 Replies

2. Shell Programming and Scripting

calculating endless columns

I have about 5000 columns of data that i need to convert all of it into pecentages. for shorter colums i have been using this code: {print $1/($1+$2)*100,$2/($1+$2),$3/($3+$4)*100 .....} but this is a teadious process... is there anyway to do it without having to write all of them out? sample... (20 Replies)
Discussion started by: chronicx
20 Replies

3. Shell Programming and Scripting

AWK program

Hi all, I have the following problem and hope someone could help me. I have 184 files, each with 5 columns (c1, c2, c3, c4, c5). I am only interrested in column 5, and would like to paste column 5 from all the 184 files into one file. I have tried the following with two files awk... (20 Replies)
Discussion started by: awkliker
20 Replies

4. UNIX for Dummies Questions & Answers

Check for null values in a column

Hi All, I have a file with 10 columns and get the required data for nine columns properly except 8th. In 8th column i have both NULL and NON NULL values...i.e certain records have values for all the columns including 8th column and certain records have 8th column as NULL.My requisite is,without... (20 Replies)
Discussion started by: ganesh_248
20 Replies

5. Shell Programming and Scripting

String copy

Hi guys I've got two columns, PRODUCT and BRAND, the Brand column currently has the first word of each product, I've acheived this by using SED to copy the first word of the PRODUCT column, however you run into trouble when the brand has more than one word, i.e. 'Weight Watchers'. Is there... (22 Replies)
Discussion started by: mrpugster
22 Replies

6. Shell Programming and Scripting

Need awk help to print specific columns with as string in a header

awk experts, I have a big file of 4000 columns with header. Would like to print the columns with string value of "Commands" in header. File has "," separator. This file is on ESX host with Bash. Thanks, Arv (21 Replies)
Discussion started by: arv_cds
21 Replies

7. Shell Programming and Scripting

How to convert a single column into several columns?

Hi I have a ksh script which gives me the output as a single column with several rows like: AAA BBB CCC DDD EEE FFF GGG HHH III I want to be able to create a new file from this file which allows me to set the number of rows and columns in the new file, i.e. for this example, if I... (30 Replies)
Discussion started by: pinpe
30 Replies

8. UNIX for Dummies Questions & Answers

Dividing a column by it's first number

Hi! Is there an easy way (maybe using awk??) to divide the values of one column of the file by it's first entry.. If I have a column: 3 4 5 6 7 I would like to divide it by 3. I want to do this for more than 100 files, so it wouldn't be practical to open file by file and... (26 Replies)
Discussion started by: cosmologist
26 Replies

9. Shell Programming and Scripting

Triming spaces few columns

File contains 10 columns,i want trim the 2,4,10 columns using single unix command. Please suggest me how to do? Thanks (21 Replies)
Discussion started by: bmk
21 Replies

10. Shell Programming and Scripting

Request to check:remove duplicates only in first column

Hi all, I have an input file like this Now I have to remove duplicates only in first column and nothing has to be changed in second and third column. so that output would be Please let me know scripting regarding this (20 Replies)
Discussion started by: manigrover
20 Replies

11. Shell Programming and Scripting

awk - treating remaining columns as one

Hi all, For no particular reason, I would like to use awk on a file that contains multiple columns, but let's say only columns 1 and 2 have some text values, and the remainder of the line contains text that I would like to treat as one column, considering I have spaces as delimiter for the... (33 Replies)
Discussion started by: ppucci
33 Replies

12. Shell Programming and Scripting

Adding a new column to a csv file

Hi, Can anyone please explain me how can I add a new column to a Csv file ? Actaully I am setting one set of commands and creating a CSV file with 4 columns. I am executing another command and it's output should be added as column 5 with a column heading ? Can anyone explain how can... (26 Replies)
Discussion started by: rrb2009
26 Replies

13. Shell Programming and Scripting

Add a character C in a column if that column is blank

I have some files that look as follows. I need to add a character 'C' in the fifth column if that column is blank. I prefer in-place editing. 1 1 B M 0 0 203 0, 0.0 0, 0.0 0, 0.0 0, 0.0 0.000 360.0 360.0 360.0 141.9 15.4 28.8 66.1 2 2 B A ... (21 Replies)
Discussion started by: thejitha
21 Replies

14. Shell Programming and Scripting

Getting data from a flat file based on condition

Hi, I have a flaty file from which i am fetching few columns in tablular form as below code. Now i want to fetch the column 6 and 7 in below code only if it either of them is non zero.However below startement awk -F, '$6==0 && $7==0{exit 1}' ${IFILE} is not working..Not sure where is the... (36 Replies)
Discussion started by: Vivekit82
36 Replies

15. UNIX for Beginners Questions & Answers

How to copy a column of multiple files and paste into new excel file (next to column)?

I have data of an excel files as given below, file1 org1_1 1 1 2.5 100 org1_2 1 2 5.5 98 org1_3 1 3 7.2 88 file2 org2_1 1 1 2.5 100 org2_2 1 2 5.5 56 org2_3 1 3 7.2 70 I have multiple excel files as above shown. I have to copy column 1, column 4 and paste into a new excel file as... (26 Replies)
Discussion started by: dineshkumarsrk
26 Replies