LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2013, 01:17 AM   #1
freshlinux
LQ Newbie
 
Registered: Sep 2013
Posts: 1

Rep: Reputation: Disabled
Help me in transpose the file column to row


Hi

I have now tried perl, bash, awk and who knows what else. Tried searching for transpose row to col and col to row . Please can someone help me?

Input file like this:

heading 1 a
heading 2 b
heading 3 c
heading 4 d

heading 1 1
heading 2 2
heading 3 3
heading 4 4

Desired output:

heading1 heading2 heading3 heading4
a b c d
1 2 3 4


Any help or a virtual slap on the forehead to jog the memory would be helpful.

Thanks in Advance!
 
Old 09-06-2013, 01:26 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,220

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
looks like homework. See the bottom of page for related problems with solutions
 
Old 09-06-2013, 03:40 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,499

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Not sure if homework or not, but definitely agree that this issue has been raised and answered several times on this site.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Transpose a column to a custom row t.othoneos Linux - Newbie 7 03-15-2012 03:06 PM
[SOLVED] find a null value in a row/column and delete entire row umix Linux - Newbie 10 10-13-2011 01:26 AM
How can I use Shell script to edit row 23 column 5-8 in a txt file? leena_d Linux - Newbie 4 12-14-2009 03:43 AM
transpose row to column? resolute155 Programming 3 09-07-2009 02:29 PM
how to get the second column and first row data from a file??? loplayers Linux - Newbie 3 11-05-2007 07:35 PM


All times are GMT -5. The time now is 04:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration