06-20-2009
Have a look at the "diff" command. The output format will not be exactly like you want it to be but close enough and the functionality you want is there.
I hope this helps.
bakunin
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
hey guys, I have two files both with two columns, I have already created an
awk code to ignore certain lines (e.g lines that start with 963) as they wou
ld begin with a certain string, however, the rest I have added together and
calculated the average.
At the moment the code also displays... (3 Replies)
Discussion started by: chlfc
3 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. UNIX for Dummies Questions & Answers
Hello I am a new unix user, and I have a work related task to compare 2 files and print all of the lines in file 2 that contain a string from file 1 Note: the fields are in different columns in the files. I suspect the is a good use for awk? Thanks for your time & help
File 1
123 232 W343... (6 Replies)
Discussion started by: KevinRidley
6 Replies
6. Shell Programming and Scripting
Hi friends,
I have multiple files. For now, let's say I have two of the following style
cat 1.txt
cat 2.txt
output.txt
Please note that my files are not sorted and in the output file I need another extra column that says the file from which it is coming. I have more than 100... (19 Replies)
Discussion started by: jacobs.smith
19 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
slack-diff
DIFF(1) User Commands DIFF(1)
NAME
slack-diff - compare file contents, modes, etc
SYNOPSIS
slack-diff [OPTION]... FILE1 FILE2
DESCRIPTION
A wrapper for diff that displays file modes and other metadata changes.
-u -U NUM --unified[=NUM]
Tell diff(1) to use unified output format.
--diff PROG
Use this program for diffing, instead of diff.
--fakediff
Make a fake diff for file modes and other things that are not file contents. Default is on, can be disabled with --nofakediff.
-r --recursive
Recursively compare any subdirectories found.
-N --new-file
Treat missing files as empty. Default is on, can be disabled with --nonew-file.
--unidirectional-new-file
Treat only missing files in the first directory as empty.
--from-file
Treat arguments as a list of files from which to read filenames to compare, two lines at a time.
-0 --null
Use NULLs instead of newlines as the separator in --from-file mode.
--devnullhack
You have a version of diff that can't deal with -N when not in recursive mode, so we need to feed it /dev/null instead of the miss-
ing file. Default is on, can be disabled with --nodevnullhack.
--version
Output version info.
--help Output this help.
FILES are `FILE1 FILE2' or `DIR1 DIR2' or `DIR FILE...' or `FILE... DIR'. If --from-file or --to-file is given, there are no restrictions
on FILES. If a FILE is `-', read standard input.
SEE ALSO
diff(1)
diffutils 2.8.1 April 2002 DIFF(1)