Sponsored Content
Full Discussion: Duplicate values merge
Top Forums Shell Programming and Scripting Duplicate values merge Post 302768709 by jiam912 on Saturday 9th of February 2013 08:44:59 AM
Old 02-09-2013
Duplicate values merge

Dear Gents,

Please can you help me to solve this problem.

Input file...

Code:
22057485  ,219 ,1050
22057485  ,223 ,1050
21897425  ,278 ,1050
21897425  ,279 ,1050
21897425  ,287 ,1050
20497465  ,602 ,1051
20517500  ,677 ,1051
20517500  ,681 ,1051
20577555  ,775 ,1052
20577555  ,778 ,1052
20357560  ,778 ,1052
20357560  ,780 ,1052
23717535  ,794 ,1053
23717535  ,805 ,1053
23657530  ,797 ,1053
23657530  ,798 ,1053
23657530  ,799 ,1053

I would like to get something like it:

output file

Code:
1050  22057485    219    223    
1050  21897425    278    279    287
1051  20497465    602    603    605
1051  20517500    677    681    
1052  20577555    775    778    
1052  20357560    778    780    
1053  23717535    794    805    
1053  23657530    797    798    799

Thanks in advance
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

merge files with same row values

Hi everyone, I'm just wondering how could I using awk language merge two files by comparison of one their row. I mean, I have one file like this: file#1: 21/07/2009 11:45:00 100.0000000 27.2727280 21/07/2009 11:50:00 75.9856644 25.2492676 21/07/2009 11:55:00 51.9713287 23.2258072... (4 Replies)
Discussion started by: tonet
4 Replies

2. Shell Programming and Scripting

Awk: How to merge duplicate lines and print in a single

The input file: >cat module1 200611051053 95 200523457498 35 200617890187 57 200726098123 66 200645676712 71 200744556590 68 >cat module2 200645676712 ... (10 Replies)
Discussion started by: winter9
10 Replies

3. Shell Programming and Scripting

duplicate values

Hi, How to enumerate duplicate values, without sorting the file. example 1 1 2 1 3 1 1 2 2 2 3 2 1 3 2 3 3 3 Where the first column have the repetead values without sorting, I would like to get the value of the times that the value is repetead , as I show... (2 Replies)
Discussion started by: jiam912
2 Replies

4. Shell Programming and Scripting

Extract values of duplicate keys

I have two questions that are related, so it would be great if you can help me with both! Question1: I have a file A that looks like this: a x b y b z c w I want to get something like: a x b y; z c w Given that a,b,c has no spaces. But the other letters might contain spaces. ... (2 Replies)
Discussion started by: Viernes
2 Replies

5. Shell Programming and Scripting

Append values of duplicate entries

My input file is: LOC_Os01g01870 GO:0006139 LOC_Os01g01870 GO:0009058 LOC_Os01g02570 GO:0006464 LOC_Os01g02570 GO:0009987 LOC_Os01g02570 GO:0008152 LOC_Os01g04380 GO:0006950 LOC_Os01g04380 GO:0009628 I want to append the duplicate values in a tab/space... (2 Replies)
Discussion started by: Sanchari
2 Replies

6. Shell Programming and Scripting

Remove duplicate values with condition

Hi Gents, Please can you help me to get the desired output . In the first column I have some duplicate records, The condition is that all need to reject the duplicate record keeping the last occurrence. But the condition is. If the last occurrence is equal to value 14 or 98 in column 3 and... (2 Replies)
Discussion started by: jiam912
2 Replies

7. Shell Programming and Scripting

How to merge two files with unique values matching.?

I have one script as below: #!/bin/ksh Outputfile1="/home/OutputFile1.xls" Outputfile2="/home/OutputFile2.xls" InputFile1="/home/InputFile1.sql" InputFile2="/home/InputFile2.sql" echo "Select hobby, class, subject, sports, rollNumber from Student_Table" >> InputFile1 echo "Select rollNumber... (3 Replies)
Discussion started by: Sharma331
3 Replies

8. Shell Programming and Scripting

Find duplicate values in specific column and delete all the duplicate values

Dear folks I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
Discussion started by: sajmar
4 Replies

9. Shell Programming and Scripting

Join and merge multiple files with duplicate key and fill void columns

Join and merge multiple files with duplicate key and fill void columns Hi guys, I have many files that I want to merge: file1.csv: 1|abc 1|def 2|ghi 2|jkl 3|mno 3|pqr file2.csv: (5 Replies)
Discussion started by: yjacknewton
5 Replies
orbd(1) 						      General Commands Manual							   orbd(1)

NAME
orbd - The Object Request Broker Daemon orbd is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. SYNOPSIS
orbd [ options ] DESCRIPTION
The Server Manager included with the orbd tool is used to enable clients to transparently locate and invoke persistent objects on server in the CORBA environment. The persistent servers, while publishing the persistent object references in the Naming Service, include the port number of the ORBD in the object reference instead of the port number of the Server. The inclusion of ORBD port number in the object refer- ence for persistent object references has the following advantages: o The object reference in the Naming Service remains independent of the server life cycle. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then independent of how many times the server is started or shutdown, the ORBD will always return the correct object reference to the invoking client. o The client needs to lookup the object reference in the Naming Service only once, and can keep re-using this reference independent of the chanes introduced due to server life cycle. To access ORBD's Server Manager, the server must be started using servertool, which is a command-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. For more information on the Server Manager, see the section in this document titled Server Manager. REQUIRED OPTIONS
-ORBInitialPort nameserverport Specifies the port on which the name server should be started. Once started, orbd will listen for incoming requests on this port. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. (required) OTHER OPTIONS
-port port Specifies the activation port where the ORBD should be started. The default value for this port is 1049. This port number is added to the port field of the persistent Interoperable Object References (IOR). (optional) -defaultdb directory Specifies the base where the ORBD persistent storage directory orb.db is created. If this option is not specified, the default value is "./orb.db". (optional) -serverPollingTime milliseconds Specifies how often the daemon thread checks for the health of registered servers. ORBD polls process health every milliseconds. The default value is 1,000 ms (or 1 second). The value specified for milliseconds must be a valid integer. -serverStartupDelay milliseconds Specifies how long the ServerManager waits before sending a location forward exception after the server is restarted. ORBD waits for milliseconds before raising a location forward exception. The default value is 1,000 ms (or 1 second). The value specified for mil- liseconds must be a valid integer. -Joption Pass option to the Java virtual machine, where option is one of the options described on the man page for the java application launcher, java(1). For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying virtual machine. Starting and Stopping the Name Service A Naming Service is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference. The name bind- ing may be stored in the naming service, and a client may supply the name to obtain the desired object reference. Prior to running a client or a server, you will start ORBD. ORBD includes a persistent Naming Service and a transient Naming Service, both of which are an implementation of the COS Naming Service. o The Persistent Naming Service provides persistence for naming contexts. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure. If ORBD is restarted, the Persistent Naming Service will restore the naming context graph, so that the bind- ing of all clients' and servers' names remains intact (persistent). o For backward compatibility, tnameserv, a Transient Naming Service shipped with older versions of the JDK, is also included in this release of J2SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, the naming context graph is lost. The -ORBInitialPort argument is a required command-line argument for orbd, and is used to set the port number on which the Naming Service will run. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon. When using Solaris soft- ware, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. You can substitute a different port if necessary. TO start orbd from a UNIX command shell, enterL orbd -ORBInitialPort 1050& From an MS-DOS system prompt (Windows), enter: start orbd -ORBInitialPort 1050 Now that ORBD is running, you can run your server and client applications. When running the client and server applications, they must be made aware of the port number (and machine name, if applicable) where the Naming Service is running. One way to do this is to add the fol- lowing code to your application: Properties props = new Properties(); props.put("org.omg.CORBA.ORBInitialPort", "1050"); props.put("org.omg.CORBA.ORBInitialHost", "MyHost"); ORB orb = ORB.init(args, props); In this example, the Naming Service is running on port 1050 on host "MyHost". Another way is to specify the port number and/or machine name when running the server or client application from the command line. For example, you would start your "HelloApplication" with the follow- ing command line: java HelloApplication -ORBInitialPort 1050 -ORBInitialHost MyHost To stop the naming service, use the relevant operating system command, such as pkill orbd on Solaris, or Ctrl+C in the DOS window in which orbd is running. Note that names registered with the naming service may disappear when the service is terminated if the naming service is transient. The Java IDL naming service will run until it is explicitly stopped. For more information on the Naming Service included with ORBD, see Naming Service. Server Manager To access ORBD's Server Manager and run a persistent server, the server must be started using servertool, which is a command-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. When a server is started using servertool, it must be started on the same host and port on which orbd is executing. If the server is run on a different port, the information stored in the database for local contexts will be invalid and the service will not work properly. Server Manager: an Example Using the sample tutorial for our demonstration, you would run the idlj compiler and javac compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application: 1. Start orbd. To start orbd from a UNIX command shell, enter: orbd -ORBInitialPort 1050 From an MS-DOS system prompt (Windows), enter: start orbd -ORBInitialPort 1050 Note that 1050 is the port on which you want the name server to run. -ORBInitialPort is a required command-line argument. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. 2. Start the servertool: To start the Hello server, enter: servertool -ORBInitialPort 1050 Make sure the name server (orbd) port is the same as in the previous step, for example, -ORBInitialPort 1050. The servertool must be started on the same port as the name server. 3. Start the Hello server from the servertool prompt: servertool > register -server HelloServer -classpath . -applicationName HelloServerApName The servertool registers the server, assigns it the name of "HelloServerApName", and displays its server id. 4. Run the client application from another terminal window or prompt: java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost For this example, you can omit -ORBInitialHost localhost since the name server is running on the same host as the Hello client. If the name server is running on a different host, use -ORBInitialHost nameserverhost to specify the host on which the IDL name server is running. Specify the name server (orbd) port as done in the previous step, for example, -ORBInitialPort 1050. 5. When you have finished experimenting with the Server Manager, be sure to shut down or kill the name server (orbd) and servertool. To shut down orbd from a DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down. To shut down orbdfrom a Unix shell, find the process, and kill it. The server will continue to wait for invocations until it is explicitly stopped. To shut down the servertool, type quit and press the Enter key on the keyboard. SEE ALSO
Naming Service, servertool 10 March 2001 orbd(1)
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy