Difference of two data files & writing to an outfile.
Hi Everyone,
I have two files i.e. one file2 contains today's data and the other file1 contains Yesterday's data.
The data in the files contains 226 columns and the data for the coulums separated by a Pipe "|" delimiter.
Now, I have 4 Primary keys (coulumns) by which I have to compare file2 and file1 and generate a diff file that is the data that is not present in file2 but present in file1 and vice versa.
The sample of the data that contains in file1 is ( 1 record):
The sample of the data that contains in file2 (Todays file) is ( 1 record):
Since I have 4 primary keys, I though of doing the code using Hashes.
Could someone please help me out. I am looking for a desperate help on this.
Really appreciated if someone could help out with some ideas.
Your primary keys have the following sequence in the record:
To extract the primary key values from the file:
Then you can compare the extracted values.
Hello all,
I have 2 text files.
For example:
File1.txt contains data
A
B
C
D
****NEXT****
X
Y
Z
****NEXT****
L
M
N
and File2.txt contains data (13 Replies)
I need to take 2 input files and create 1 output based on matches from each file. I am looking to match field #1 in both files (Userid) and create an output file that will be a combination of fields from
both file1 and file2 if there are any differences in the fields 2,3,4,5,or 6.
Below is an... (5 Replies)
Hi
I am writing a perl script which checks for the specific column values from a file and writes to the OUT file.
So the feed file has a header information and footer information.
I header information isaround107 lines i.e.
Starts with
START-OF-FILE
.......
so on ....
... (11 Replies)
cat file1.txt
field1 "user1":
field2:"data-cde"
field3:"data-pqr"
field4:"data-mno"
field1 "user1":
field2:"data-dcb"
field3:"data-mxz"
field4:"data-zul"
field1 "user2":
field2:"data-cqz"
field3:"data-xoq"
field4:"data-pos"
Now i need to have the date like below.
i have just... (7 Replies)
Hi Guys,
I have two input files and I want to combine them and get the unique values and differences and put them into one file. See below desired output file.
Inputfile1:
1111111
2222222
3333333
7860068
7860069
7860071
7860072
Inputfile2:
4444444 (4 Replies)
Hi,
I have several text files. One main file contains the detail data, other have some information to extract data from the main file, and some are empty files. Examples are shown below:
The main file look like:
MainFile.txt
>Header1
data1...data1...
>Header2
data2...data2...
...
...... (2 Replies)
Hi,
I have two text files. Need to create a third text file extracting specific data from first two existing files..
Text File 1: Format contains:
SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010
some text ............so on...and somwhere text like:
Record 1:... (1 Reply)
ehe may i know what are the difference between Unix & Linux, and what are the advantages of having Unix as well as disadvantages of having Unix or if u dun mind i am dumb do pls tell me what are the advantages as well as the disadvantages of having linux as well. thanks (1 Reply)