Solved

column to row

Posted on 2002-04-06
4
414 Views
Last Modified: 2010-04-21
How to convert a single column data to a row using  
unix command(s)? For example, convert
   4
   12
   A
   B33
to
   
   4    12   A   B33

Thank you.
0
Comment
Question by:geermu
4 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 100 total points
ID: 6923404
tr '\012' ' '
0
 
LVL 5

Expert Comment

by:ecw
ID: 6924227
echo `cat file`
0
 
LVL 3

Expert Comment

by:elfie
ID: 6924877
another one :

for i in `cat file`
do
print -n $i" "
done

Between " " you can put some delimiters.
0
 

Author Comment

by:geermu
ID: 6925685
Outstanding! Thank you all.
I will accept ozo's comment as an answer. ¡¡
I will £á£ì£ó£ï¡¡£ã£ò£å£á£ô¡¡£á£ä£ä£ô£é£ï£î£á£ì¡¡£ô£÷£ï¡¡£ñ£õ£å£ó£ô£é£ï£î£ó
£ï£æ¡¡£µ£°¡¡£ð£ï£é£î£ô£ó¡¡£æ£ï£ò¡¡£å£ã£÷¡¡£á£î£ä¡¡£å£ì£æ£é£å¡¡£æ£ï£ò¡¡£ô£è£å
£è£å£ì£ð£æ£õ£ì¡¡£é£î£æ£ï£ò£í£á£ô£é£ï£î¡¡£ð£ò£ï£ö£é£ä£å£ä£®
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now