02-15-2010
even the first and third line is different, how is only the second line is different.. are you comparing only the first column.. am i missing something...
Btw, you can use diff command to find the difference between the files.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
suppose one file
P1168S
P2150L
P85L
Q597R
R1097C
Another file
P2150L
P85L
Q597R
R1097C
R1379C
R1587K
Then output shud be
R1379C
R1587K
thanks (5 Replies)
Discussion started by: cdfd123
5 Replies
2. Shell Programming and Scripting
I have two files like this:
#FILE 1
ABCD 4322 26485
JMTJ 5311 97248
XMPJ 4321 58978
#FILE 2
ABCD 4321 26485
JMTJ 5311 97248
XMPJ 4321 68978
What to do: Compare the two files and find those lines that doesn't match. And have a new file like this:
#FILE 3
"from file 1"
ABCD 4322 26485... (11 Replies)
Discussion started by: kingpeejay
11 Replies
3. Shell Programming and Scripting
I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem.
I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
Discussion started by: kingpeejay
4 Replies
4. Shell Programming and Scripting
one file
. . importing table employee 119
. . importing table jobs 1
2nd file
. . importing table employee 120
. . importing table jobs 1
and would like... (2 Replies)
Discussion started by: jhonnyrip
2 Replies
5. Shell Programming and Scripting
Dear all,
I have some problem here. I want to detect the differences between two text files and count the number of differences between them.
Such as file1.txt i have : I am new in perl.
and file2.txt i have : I ma enw in pearl.
So it should return me 3 as the number of differences.
So... (2 Replies)
Discussion started by: branred
2 Replies
6. Shell Programming and Scripting
For example, in this command:
ls /etc/rc0.d/ -print
ls /etc/rc0.d/ -printfThe outputs are quite different, why? (7 Replies)
Discussion started by: Henryyy
7 Replies
7. Shell Programming and Scripting
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies
8. Shell Programming and Scripting
Hello,
I have two text files, each with a single column,
file 1:
124152970
123899868
123476854
54258288
123117283
file 2:
124152970
123899868
54258288
123117283
122108330 (5 Replies)
Discussion started by: LMHmedchem
5 Replies
9. Shell Programming and Scripting
Hi
PRIM_SEQ=`some sql code`
and output of PRIM_SEQ is like below
120
130
STB_SEQ=`some sql code`
and output of STB_SEQ is like below
115
110
i need to compare this two variables output ( decimal numbers)
1) What I want to do is to compare every number in the PRIM_SEQ with... (8 Replies)
Discussion started by: amar1208
8 Replies
10. UNIX for Beginners Questions & Answers
compare two variables and print the difference
i have two variables
X1=rac1,rac2
Y1=rac2,rac3
output=rac1,rac3
Use code tags to wrap code fragments or data samples. (1 Reply)
Discussion started by: jhonnyrip
1 Replies
LEARN ABOUT DEBIAN
rmgdiff
RMGDIFF(1x) RMGDIFF(1x)
NAME
rmgdiff - use almost any graphical file difference browser to recursively view the differences between two directories.
SYNOPSIS
rmgdiff [-b] [-d] [-g gui] [-n] dir1 dir2
DESCRIPTION
rmgdiff is an awk script that works in conjunction with almost any graphical file difference browser. It is known to work with mgdiff,
tkdiff, and xdiff.
Unless I am mistaken, most of the GUI difference viewers (except for emacs) do not have built-in support for recursing down two directo-
ries, but diff does. Based on diff's output, rmgdiff decides when to invoke the graphical difference viewer.
In addition, rmgdiff also collates diff's output. As soon as a new difference is encountered in a text file, rmgdiff will print to stan-
dard output the name of the file that both directories have in common. It will then start the GUI and block until the user exits. As more
text files with differences are found, the GUI will be started up again.
In the interim, rmgdiff will keep track of differences in binary (non-text) files. It organizes the binary files as executables, shared
libraries, static libraries, object files, and other. Only after all the text files have been displayed will rmgdiff report the binary
differences.
It also keeps track of files and directories that diff reports as being only in one directory or another. rmgdiff organizes these entries
by directory. Thus, files in one directory will be reported in one block, and files that are in the other directory will be reported in a
different block.
In addition to printing the name of the files that are different, rmgdiff defaults to printing the relevant portion of the output from the
file command. This has the unfortunate side-effect of slowing things down; however, I find this information to be invaluable. If you're
just looking for a fast way to collate diff's output, try piping it into sort instead.
COMMAND LINE OPTIONS
-b Sets the basic reporting mode. In basic mode, rmgdiff reports only file names. It does not report the file types involved.
-c By default, files relating to CVS are ignored by rmgdiff. If you want to include CVS files, use this option.
-d Sets rmgdiff to print way too much debugging information.
-g gui Tells rmgdiff which gui you would like to use for viewing differences. By default, mgdiff is used. You can also set $RMGDIFF_GUI
in your environment, but it can be overridden with this option.
-n rmgdiff will not invoke the gui. This is useful, if you only want to view the collated output.
AUTHOR
Paul Serice (paul@serice.net)
RMGDIFF(1x)