Unix/Linux Go Back    


Homework & Coursework Questions Students must use and complete the template provided. If you don't, your post may be deleted! Special homework rules apply here.

Help with pivoting table shell script

Homework & Coursework Questions


Tags
column to row, pivoting table

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-04-2016
senmatrix senmatrix is offline
Registered User
 
Join Date: Aug 2016
Last Activity: 8 August 2016, 5:12 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Help with pivoting table shell script

input file txt file


Code:
2000	    1	      name			
2000	    2	      addr			
2000	    3	      phone			
2000	    4	      email			
1000	    1	      name			
1000	    2	      addr			
1000	    3	      phone			
1000	    4	      email			
3000	    1	      name			
3000	     2	      addr			
3000	     3	      phone			
3000	       4	 email			
44444	1	name			
44444	2	addr			
44444	3	phone			
44444	4	email

needed output


Code:
1000		name 	addr	phone	email
2000		name 	addr	phone	email
3000		name 	addr	phone	email
44444        name 	addr	phone	email



Moderator's Comments:
Help with pivoting table shell script Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.


---------- Post updated at 04:44 PM ---------- Previous update was at 04:21 PM ----------

this is not home work

Last edited by rbatte1; 08-04-2016 at 07:34 AM.. Reason: Added CODE tags
Sponsored Links
    #2  
Old Unix and Linux 08-04-2016
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 12 September 2017, 4:42 AM EDT
Location: Loughborough
Posts: 1,221
Thanks: 366
Thanked 323 Times in 253 Posts
Have you searched the entire site for the word "pivot" using the "Search" pull down menu?

I guess not, because there are umpteen solutions on the theme.
Sponsored Links
    #3  
Old Unix and Linux 08-04-2016
senmatrix senmatrix is offline
Registered User
 
Join Date: Aug 2016
Last Activity: 8 August 2016, 5:12 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
not matching my requirement ,
    #4  
Old Unix and Linux 08-04-2016
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 12 September 2017, 4:42 AM EDT
Location: Loughborough
Posts: 1,221
Thanks: 366
Thanked 323 Times in 253 Posts
Quote:
not matching my requirement ,
Do you honestly mean to tell me that NONE of the threads that are available on this site cannot be modified by you for yourself?
(I am at a loss.)

What is so special about your specific requirements, please show us a real example?!
Sponsored Links
    #5  
Old Unix and Linux 08-04-2016
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 22 September 2017, 6:20 AM EDT
Location: Aachen, Germany
Posts: 11,367
Thanks: 297
Thanked 3,523 Times in 3,242 Posts
Why in the first place did you post in the Homework & Coursework forum? When you do this, the special rules for this forum must be complied with.

If this is NOT home- or classwork, please give some more background like
- the origin and context of this task
- the company you work for
- your role in the company
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Pivoting using shell scripts mohan705 Shell Programming and Scripting 3 07-27-2016 02:54 AM
Shell Script Table scruffytramp Shell Programming and Scripting 3 12-10-2013 01:44 PM
Transposing rows and columns (pivoting) using shell scripting ksatish89 Shell Programming and Scripting 9 04-25-2012 05:23 AM
Alter Table Shell Script ankitgupta Shell Programming and Scripting 2 10-06-2006 06:01 AM
Reading a table in a shell script luiscarvalheiro Shell Programming and Scripting 13 08-10-2006 06:16 PM



All times are GMT -4. The time now is 09:33 AM.