Questions tagged [columns]

Use this tag when describing a specific portion of a particular group of entries in a table or a matrix or any other structured data set which is vertically aligned.

Use this tag when describing a specific portion of a particular group of entries in a table or a matrix or any other structured data set which is vertically aligned.

339 questions
4
votes
2 answers

"Fill columns before rows" option in unix column command

According to man column: -x Fill columns before filling rows. This option doesn't seem to do anything. Any idea how to use it?
balki
  • 4,407
2
votes
3 answers

How to separate first column content in different rows

I have the input data with 5 columns separate by tabs: Class1,Class2 info1 info2 info3 info4 Class3 info1a info2a info3a info4a Class4,Class5 info1b info2b1,info2b2 info3b info4b When I have, in the first column, data separate by comma, I would…
Alex
  • 334
  • 5
  • 15
2
votes
1 answer

Transpose several columns (of varying lengths) into rows

A similar question to mine was asked that concerned transposing multiple columns into rows. However, the particular column format that I am dealing with is slightly different in that my file contains a varying number of columns that sometimes have…
Dave
  • 45
0
votes
1 answer

AWK to replace 2nd column by minus with 1st data from specific line

I would like to get the 1st data on 1st column (i.e:1.20E-05) and replace the whole second column by minus with this 1st data. Then, i would like to delete the last data line and print to a new file. I have a data such as below: body comments Vxx yy…
0
votes
1 answer

Sum First Column on basis of Second Column

I have written a Bash script which stores the number of records(line count) in a file and File name which is present in the directory in a output.txt file. The output.txt file is as below. No.ofRecord FileName delimiter 563394 …
Satya
  • 13
0
votes
1 answer

Arrangement of column next to last Nth instance of delimiter

I have the following data in my file alice bob cathy david elon unix linux bsd I want output with only the last Nth instance of delimiter (ie. a space) being arranged Like for last instance of delimiter (space) alice bob cathy david …
0
votes
1 answer

Sum values from column 1 if column 2 rows have a value match

I have data in a .txt like this: 2 40 1 50 1 50 1 50 1 50 2 70 2 70 5 80 5 80 6 100 And I want to sum first column if the second column's rows match so I can get an output like this: 2 40 4 50 4 70 10 80 6 100 Thanks…
0
votes
3 answers

Creating columns from text output but with multiple word columns

I have the following output: Person 49 Persons Boss 3 HR 21 CEO 93 System Administrator 2 Using column -t produces the following output: Person 49 Persons Boss 3 HR 21 CEO 93 System Administrator 2 as you can see this…
Matt
  • 3