11-12-2007
hey DRL thanks a ton!! for your help ..
but again as per the requirement of boss it has to be done using Unix shell script ( plsql if required)
the files
file1 and file2 won't necessarily have the same number of rows .
file1 and file2 have column values of a specific oracle table exported and stored in Unix system
on regular basis .
the idea is two compare the contents of the files of previous day and current day ( for e.g file1 is previous day's file and file2 is current day's file) i.e. we got to do row wise comparison of file and detect if there is change in any particular row value if any particular row in file2 (say for e.g row number 3 ) differs from row number 3 of file1 ... then the script should pick up the row num 3 value from
file 2 and re-direct it to another third file.
but since we got to verify previous day's and current day's records .. so even if both the files do not have same number of lines ... it won't be a problem as our target is to compare whether a particular row which had some value until yesterday still has the same value today or has it been changed..
in such case the script can compare until it reaches the row end of file1 .
hope i m clear with my question
Last edited by Dana Evans; 11-12-2007 at 11:54 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am very new to Unix. What are the similiarities and differences between ScoUnix and AIX5 if any? Where might i find the information? Which is better? (1 Reply)
Discussion started by: NewGuy100
1 Replies
2. Shell Programming and Scripting
Kindly help on follows.
I have 2 files. One file contains only one column of mobile numbers. And total records in a file 12 million. Second file contains 2 columns mobile numbers and balance. and total records 30 million. I want to find out balance of each data in file 1 corresponding to file 2.... (2 Replies)
Discussion started by: kamal_418
2 Replies
3. Shell Programming and Scripting
Hi,
I have a problem with comparison of two files
file1
20100101
20090101
20080101
20071001
20121229
file2
19990112 12 456 7
20011131 19
20100101 2 567 1 987
17890709 123 555
and, sh script needs to compare of these two files and give out to me result:
20100101 2 567 1 987
it... (5 Replies)
Discussion started by: shizik
5 Replies
4. Shell Programming and Scripting
Hello,
I have 2 files and I want them to be compared in a specific fashion
file1:
A_1200_1250
A_1251_1300
B_1301_1350
B_1351_1400
B_1401_1450
C_1451_1500 and so on...
file2:
1210 1305 1260 1295
1400 1500 1450 1495
Now The script should look for "1200" from A_1200_1250 of... (8 Replies)
Discussion started by: Diya123
8 Replies
5. Shell Programming and Scripting
Hi all
I have two files which I have to compare that whetehr there is soemthing common or not
body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; }
body, div, table, thead, tbody, tfoot,... (2 Replies)
Discussion started by: manigrover
2 Replies
6. Shell Programming and Scripting
Hi all,
I want to compare two files with same number of rows and columns with records in same order.
Just want to highlight the differences in the column values if any.
file A
1,kolkata,19,ab
2,delhi,89,cd
3,bangalore,56,ef
file2:
1,kolkata,21,ab
2,mumbai,89,gh
3,bangalore,11,kl... (9 Replies)
Discussion started by: prabhat.diwaker
9 Replies
7. Shell Programming and Scripting
Hi All ,
As I am new to unix scripting ,I need a help regarding unix scripting .I have two .txt files .One is source file and another is target file.I need a script through which I can compare those two files.I need a automated comparison report in a directory after comparing between source &... (2 Replies)
Discussion started by: STCET22
2 Replies
8. Shell Programming and Scripting
Hi All ,
I am aware of unix command ,but not comforable in putting together in script level.I came to situation where I need to compare between two .txt files fieldwise and need a mismatch report. As I am new to unix script arena ,if anyone can help in the below scenario that will be really... (9 Replies)
Discussion started by: STCET22
9 Replies
9. Shell Programming and Scripting
I have two files which has component name and version number separated by a space
cat file1
com.acc.invm:FNS_PROD 94.0.5
com.acc.invm:FNS_TEST_DCCC_Mangment 94.1.6
com.acc.invm:FNS_APIPlat_BDMap 100.0.9
com.acc.invm:SendEmail 29.6.113
com.acc.invm:SendSms 12.23.65
cat file2 ... (8 Replies)
Discussion started by: rakeshtomar82
8 Replies
10. Shell Programming and Scripting
I have the requirement
I have two files
cat fileA
something
anythg
nothing
everythg
cat fileB
everythg
anythg
Now i shld use fileB and compare every line at fileA and get the output as
something
nothing (3 Replies)
Discussion started by: Priya Amaresh
3 Replies
XZDIFF(1) XZ Utils XZDIFF(1)
NAME
xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files
SYNOPSIS
xzcmp [cmp_options] file1 [file2]
xzdiff [diff_options] file1 [file2]
lzcmp [cmp_options] file1 [file2]
lzdiff [diff_options] file1 [file2]
DESCRIPTION
xzcmp and xdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed
directly to cmp or diff. If only one file is specified, then the files compared are file1 (which must have a suffix of a supported com-
pression format) and file1 from which the compression format suffix has been stripped. If two files are specified, then they are uncom-
pressed if necessary and fed to cmp(1) or diff(1). The exit status from cmp or diff is preserved.
The names lzcmp and lzdiff are provided for backward compatibility with LZMA Utils.
SEE ALSO
cmp(1), diff(1), xz(1), gzip(1), bzip2(1), zdiff(1)
BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified.
Tukaani 2009-07-05 XZDIFF(1)