transpose command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers transpose command
# 1  
Old 05-15-2007
transpose command

I need to transpose data from one row to one column. If there is any idea to do it would be helpful.

example of input data
314.16177368164102, 314.71533203125, 315.208740234375

wantted output data
314.16177368164102
314.71533203125
315.208740234375

Thank you so much for any advance help.

su_in99
# 2  
Old 05-15-2007
Try this:
Code:
tr ',' '\n' < input_file

# 3  
Old 05-15-2007
A simple search for the word "transpose" would yield a number of solutions.
# 4  
Old 05-16-2007
Shell Life,
Thanks a lot for your code
Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Shell command to transpose Row & Column

Hi all, need a help with getting a one line command to do the following. i have an input file with rows of data containing credits for each office, the output should be one row for each office with all the credits in rows for that office, if its not there then it should say N/A. the credits are... (10 Replies)
Discussion started by: tech_frk
10 Replies

2. UNIX for Dummies Questions & Answers

Transpose File

Have various files like this: InSlot=0x00000001 InPort=0x00000000 Inref=0x0000002f InSID=0x00000001 OutSlot=0x00000001 OutPort=0x00000002 Outref=0x00000000 OutSID=0x0000000b OutUName_2=14 InSlot=0x00000001 InPort=0x00000000 Inref=0x000001a8 InSID=0x00000001 OutSlot=0x00000001... (5 Replies)
Discussion started by: K@rlos
5 Replies

3. Shell Programming and Scripting

Transpose using awk

Hi Friends, Very urgent requirement please do needful ASAP.. Input: |1||1|1||1|3||3|2||2|4||4|2||2|3||3|NA||0|5||5|NA||0|4||4|3||3 output: |1||1 |1||1 |3||3 |2||2 |4||4 |2||2 |3||3 |NA||0 |5||5 (4 Replies)
Discussion started by: bharat1211
4 Replies

4. Shell Programming and Scripting

Find and transpose

Dear All I was wondering how to resolve an issue that I met during my analysis. In particular I have a file like this(tab separated): factor1 element1 chr1 309343146 330945480 1 protein_coding geneA factor2 element2 chr2 309350853 309603230 1 protein_coding geneA factor3 element3 chr3... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies

5. Shell Programming and Scripting

Transpose

TRANSPOSE -------------------------------------------------------------------------------- i have a file with recurring fields Start A 1 B 2 C 3 D 4 E 5 End Start A 11 B 12 C 23 D 25 E 21 (1 Reply)
Discussion started by: aravindj80
1 Replies

6. Shell Programming and Scripting

How do I transpose a of results ?

Hello, Can anyone advise me what command I could use to display the results of the following command ATOM 1 ca 2 o 3 h 4 h 5 o dE/dx 0.2057422D-01 0.2463722D-01-0.1068047D-01-0.1495280D-01-0.3725362D-02 dE/dy -0.7179106D-02-0.1554542D-01 0.1016889D-01 0.3268502D-02-0.4888578D-01 dE/dz... (3 Replies)
Discussion started by: wanchem
3 Replies

7. Shell Programming and Scripting

Transpose a file

input IndID ID1 ID2 ID3 a1 a/a b/b c/c a2 a/a b/b c/c a3 a/b b/b c/d a6 a/b b/b c/e a8 a/a b/c c/e a9 b/b b/d c/e output IDName IndID IDtype C_No ID1 a1 a/a 1 ID1 a2 a/a 1 ID1 a8 ... (1 Reply)
Discussion started by: stateperl
1 Replies

8. Shell Programming and Scripting

File Transpose

Hi ALL I have one input file say FILE1 which looks as below. a=1 b=2 c=3 a=4 b=5 c=6 . . . Here a,b,c...etc are variable names. The output file(FILE2) should look like 1,2,3 4,5,6 ..... ..... (5 Replies)
Discussion started by: 46019
5 Replies

9. Shell Programming and Scripting

Transpose using awk

I have a requirement to transpose the below xml which is in a text file on unix: <?xml version="1.0" ?> <REQUEST> <ID>XXX</ID> <TIMESTAMP>20090720062610</TIMESTAMP> <FLAG>Y</FLAG> <TO_FLAG>Y</TO_FLAG> </REQUEST> to <?xml version="1.0"... (13 Replies)
Discussion started by: new_ds_man
13 Replies

10. Shell Programming and Scripting

transpose file

Hi all, I have a file in the below format.... <A> B C <A> E F <A> G H I need the result file to be: <A>BC <A>EF <A>GH (3 Replies)
Discussion started by: new_ds_man
3 Replies
Login or Register to Ask a Question