Closed

Merge two files java program

Write a program to solve the following problem:

Your program must accept two filenames as command-line parameters. These files will contain 7-bit ASCII text, and each line may consist of an IP address, followed by a colon, followed by a comma-separated list of numbers. The two files should be joined on IP address and the numbers from each file should be appended and returned, sorted and without duplicates. The results should be written to stdout as the IP address followed by a colon, followed by a comma separated list of the numbers.

For example, file1:

1.2.3.4: 1,3,4

1.2.3.5: 9,8,7,6

And file2:

1.2.3.4: 4,5,6

1.2.3.6: 1,1,1

Your program should print:

1.2.3.4: 1,3,4,5,6

1.2.3.5: 6,7,8,9

1.2.3.6: 1

Your program should handle errors, including malformed input, appropriately and should be of a sufficient quality that it can run on a production Linux system.

Please provide the source code, automated tests, any additional data (e.g. build scripts) or information (e.g. assumptions you've made, known bugs, etc) that you think we would need to fairly judge your submission.

Skills:

See more: how to merge two csv files in java, merge multiple tiff files into one in java, java program to merge the contents of two file into a single file, merge multiple text files into one java, merging two csv files with a common column java, how to merge two word documents in java, how to merge two html files in java, java code to merge multiple excel files, program merge files, java program parse log files create report, examples java program needs input user, user will input matrix java program example, java program merge text file delimiter, write java program ask user input scores, simple java program accept input, simple java program asks input, extract data pdf files java program, mortgage calculator java program user input, write java program input pairs large numbersprogram read echo pair numbers compute report sum product process pair end input , write java program parse text files

About the Employer:
( 1 review ) Johannesburg, South Africa

Project ID: #23513345