Unix/Linux Go Back    



Columns to Rows

Windows & DOS: Issues & Discussions




Kindly Note - This is a Single User Post by Forum Member sameeribraimo Regarding:
Columns to Rows.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 07-12-2012   -   Original Discussion by sameeribraimo
sameeribraimo's Unix or Linux Image
sameeribraimo sameeribraimo is offline
Registered User
 
Join Date: May 2012
Last Activity: 12 July 2012, 4:39 PM EDT
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Columns to Rows

I want to create a script with gawk.

I have the following file with 2 columns:




Code:
A 1 
A 2
A 3
B 1
B 2
B 3
C 1
C 2
D 1
D 2
D 3
D 4

and i want to convert to:



Code:
A 1 2 3
B 1 2 3 
C 1 2
D 1 2 3 4

Thanks in advance.

BR,
Sameer
Moderator's Comments:
Code tags for code, please.

Last edited by Corona688; 07-12-2012 at 06:01 PM..