The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Changing date format manneni prakash Shell Programming and Scripting 7 06-26-2008 11:56 PM
changing format shary Shell Programming and Scripting 4 01-31-2008 02:20 AM
Changing the format of date nhatch UNIX for Dummies Questions & Answers 4 04-11-2006 07:17 AM
Changing date format Sabari Nath S Shell Programming and Scripting 5 12-07-2005 12:38 AM
Changing the date format Dream86 Shell Programming and Scripting 10 06-08-2005 10:35 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-01-2008
Registered User
 

Join Date: Jun 2008
Posts: 4
Changing display and format of file

I have an input file which looks like this:
601 a
602 a
603 a
601 b
610 c
615 c
603 d
601 d
612 d

I need the utput to look like this

601 a 602 603
602 a 601 603
603 a 601 602
601 b
610 c 615
615 c 610
603 d 601 612
601 d 603 612
612 d 601 603

Any idea how this can be done?

Regards
Wah
Reply With Quote
Forum Sponsor
  #2  
Old 08-02-2008
Registered User
 

Join Date: Mar 2008
Posts: 21
Firstly, please create file below:

a 601 602 603
b 601
c 610 615
d 601 603 612

Secondary, please use "join" command:

a 601 601 602 603
a 602 601 602 603
a 603 601 602 603
b 601 601
c 610 610 615
c 615 610 615
d 601 601 603 612
d 603 601 603 612
d 612 601 603 612

Thirdly, please replace 1st word and 2nd word.

Forthly, please delete same word as 1st word.

It's my idea. One step is easy.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0