Converting values in a ROW to COLUMN


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Converting values in a ROW to COLUMN
# 1  
Old 02-11-2010
Converting values in a ROW to COLUMN

Hi All,
I needd to convert values in a row to a column.
eg: Input is as: value1,value2,value3,value4,.........,value N

Required Output:
Value1
Value2
Value3
.
.
.
Value N

Please help....
# 2  
Old 02-11-2010
Try:

Code:
echo "A,B,C,D,E" | tr ',' '\n'

# 3  
Old 02-11-2010
# 4  
Old 02-11-2010
Thanks Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

How to add one to each row values and keep it after the value in the column?

Dear Folks Hello I have a column of numbers, say: 26 79 68 I want to add one to each row value and get this desire column: 26 27 79 80 68 69 (6 Replies)
Discussion started by: sajmar
6 Replies

2. Shell Programming and Scripting

Using loop command in UNIX for converting column to row

Dear folks I have 300 files which one of them are looking like: 1.SNP 0 0 1 0 I am looking for desire output: 1.SNP 0 0 1 0 I used this below command to run all of the 300 file at the same time for file in *.SNP; do awk '{printf( "%s ", $1 );} END {printf("\n");}' $file >... (1 Reply)
Discussion started by: sajmar
1 Replies

3. Shell Programming and Scripting

Move values from column to row

Hello guys. Please can you help me with this.. Thanks in advance:b: Input file 2134 6371 N 2150 6371 M 2166 6371 S 2138 6417 N 2154 6417 M 2170 6417 S 2157 6603 N 2173 6603 M 2189 6603 S desired uotput 6371 2134N 2150M 2166S 6417 2138N 2154M 2170S... (2 Replies)
Discussion started by: jiam912
2 Replies

4. Shell Programming and Scripting

Print every 5 4th column values as separate row with different first column

Hi, I have the following file, chr1 100 200 20 chr1 201 300 22 chr1 220 345 23 chr1 230 456 33.5 chr1 243 567 90 chr1 345 600 20 chr1 430 619 21.78 chr1 870 910 112.3 chr1 914 920 12 chr1 930 999 13 My output would be peak1 20 22 23 33.5 90 peak2 20 21.78 112.3 12 13 Here the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

5. Shell Programming and Scripting

Converting odd values to even values(or vice-versa) located in a column

Hello All, I have a below data in a .csv file where all rows where col1 is A, col2 is odd numbers, similarly even numbers for all rows where col1 is B. Note that my data has some other columns(not shown here) too (around 100) after col2. Tool,Data A,1 A,3 A,5 .... so on B,2 B,4 .... ... (4 Replies)
Discussion started by: ks_reddy
4 Replies

6. Shell Programming and Scripting

converting column to row

Hi everyone.. I have a list of values in a file... 1.2345e-1 2.282828e+ 3.2341e-1 1.1223445e-1 I am interested in converting this column to a row.. 1.2345e-1 2.282828e+ 3.2341e-1 1.1223445e-1 can anyone pls help?? I am a liunx newbie.. Thanks.. (7 Replies)
Discussion started by: kjha
7 Replies

7. Shell Programming and Scripting

Help converting column to row for multiple files

Hi all, I am pretty new at this so be gentle. Also, if there is any chance you could explain what the code you use is actually doing, that would really help me out, Im learning after all :) So I am trying to convert a selected column of numbers from input file1 into a row in output file2 ... (3 Replies)
Discussion started by: StudentServitor
3 Replies

8. Shell Programming and Scripting

Arrange values of a column in row

HI, I need to arrange values of a colum in row. e.g. input file : Alpha<>123 AAAA<>6754 Beta<>456 BBBB<>63784 CCC<>783 Gama<>789 Alpha<>555 AAAA<>6754 BBBB<>63784 Beta<>666 CCC<>783 Gama<>888 (9 Replies)
Discussion started by: The_Archer
9 Replies

9. Shell Programming and Scripting

Convert column values into row

hi, I have a requirement where in I read the values from a file using awk. The resulting data should be converted into row format from column format. For ex: My log file login.lst contains the following SERVER1 DB1 SERVER2 DB2 SERVER3 DB3 SERVER4 DB4 I use awk to grep only the server... (6 Replies)
Discussion started by: senthil3d
6 Replies

10. Shell Programming and Scripting

Converting Column values to comma delimted single Row

I have a requirement in which i have to read a file which has multiple columns seperated by a pipe "|" from this i have to read each column values seperately and create a comma seperated row for the column and write to another file. eg: Input file: ColA ColB 1 2 2 x 3 y... (5 Replies)
Discussion started by: nvuradi
5 Replies
Login or Register to Ask a Question