LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-20-2008, 11:43 PM   #1
cgcamal
Member
 
Registered: Nov 2008
Location: Tegucigalpa
Posts: 72

Rep: Reputation: 16
Show unique values with related data in one line


Hello everyone,

Some help with this.

I have a file with many numbers repeated 2, 3, or sometimes 7 times in consecuitve lines
in column 1. Those numbers have a number related in column 2.

I would like to show only one time the repeated numbers in column 1 and put the numbers
related in column 2 joined in one line.

I have a pattern as follow:

(there are no blanks empty lines, I show like this to see better in this example)


Code:
72130000003	2
72130000003	31
72130000003	12

72130000007	4
72130000007	9
72130000007	11
72130000007	3

72131949999	5
72131949999	7
72131949999	9
I would like to obtain

Code:
72130000003 2 31 12
72130000007 4  9 11  3
72131949999 5  7  9
Thanks in advance for any help
 
Old 11-21-2008, 02:48 AM   #2
burschik
Member
 
Registered: Jul 2008
Posts: 159

Rep: Reputation: 31
Come on now. You keep asking for help with virtually identical problems. Aren't you going to learn anything from the suggestions made?
 
  


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
Search values within multiple files line to line Chrizzieej Programming 5 09-26-2008 04:11 PM
set and env show values of what file(s)? xcore_on Linux - Newbie 4 05-30-2006 05:16 PM
phpinfo wont show updated values..Why??? Help rajnair0278 Linux - Software 13 03-22-2006 04:21 AM
HOWTO access Processor ID / other unique values?? kartheekpn Linux - Security 5 03-20-2005 04:10 AM
MySQL - UNIQUE values across two columns - non-standard constraint issue benr77 Linux - General 2 11-06-2004 10:48 AM


All times are GMT -5. The time now is 04:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration