diff(1) can be told to ignore differences with tabs (--ignore-tab-expansion), spaces (--ignore-space-change) or (--ignore-all-space) and also carriage returns (--strip-trailing-cr), i.e. any number of cpaces or tabs are treated as one space or tab respectively or any form of "whitespace" is treated as equivalent and the presence of cr+lf or just lf is treated as erquivalent, all these are worth a try. Other parameters worth trying are --text and --speed-large-files.
Otherwise you can use od(1) to look at what is really in each line in ASCII, e.g. run:
against both files (looking at only the first 10 lines of each) and see if that may give you a clue as why diff thinks every line is different.
I need to write a script to find out if there are any .c files created/removed from the last time i monitored the files available. i first created a file to contain all the .c files available on the system. (ls *.c > file1)
I created another file using the same command.
I used the comm file1... (4 Replies)
Hello Everybody!!!!!!!!! Request you to help me with the below mentioned issue:
I have 2 files say,
File 1:
a|4|7
b|3|2
c|8|8
d|8|9
File 2:
a|4|6
b|2|2
c|8|8
d|9|8
The third file(output file) should have:
Data mismatch in row 1 column 3
Data mismatch in row 2 coumn 2
Data... (3 Replies)
Hello,
I am new to scripting and have been trying to compare two different directories, but with all the same file names in each directory for file changes. I have been doing it in baby steps and have been doing pretty good, but I have hit a few snags. Test 1 and Test 2 work great, but my... (4 Replies)
I have the 2 files
File 1
ABC,1239800
BCED,890000
ABCKJK,66767
File 2
GUHJC,1239800
ABC,1239800
TYIO,5636
The thing is the no of values in file can exceed example ABC,1239800,4545465,AHHAH so i need to find those values in file 1 which do not match in File 2 so i should get... (7 Replies)
Hi
Hope you are having a great weeknd !! I had a question and need your expertise for this :
I have 2 files File1 & File2(of same structure) which I need to compare on some columns. I need to find the values which are there in File2 but not in File 1 and put the Differences in another file... (5 Replies)
Hello,
I compiled the object file of a binary and i could see the symbol , "void*std::__node_alloc<1,0>::_M_allocate(unsigned)", this is actually present as "void*std::__node_alloc<true,0>::_M_allocate(unsigned)" in the libstlport4.so.1 . This has been verified with "nm -C " command
Please... (4 Replies)
Hi
i have gone through some sdiff command it shows the differences side by side and its really awesome
file 1:
this tool is for
checking the differ
merging with flower pots documentation
file 2:
this t ool is for
checking the differ
mergin g with flower pots documentation
... (27 Replies)
I am trying to find the differences between the two sorted, tab separated, attached files. Thank you :).
In update2 there are 52,058 lines and in current2 there are 52,197 so 139 differences should result.
However,
awk 'FNR==NR{a;next}!($0 in a)' update2 current2 > out2comm -1 -3... (2 Replies)
This seems pretty simple, but I cant figure it out. I get stumped on the simple things.
I am running two commands
1) take a listing a directory of files, and filter out the doc_name (which is in a series of extracted files), and place it in a file.
ls -l | awk '{print $9}' | grep... (5 Replies)
Discussion started by: jeffs42885
5 Replies
LEARN ABOUT SUSE
sdiff
SDIFF(1) User Commands SDIFF(1)NAME
sdiff - side-by-side merge of file differences
SYNOPSIS
sdiff [OPTION]... FILE1 FILE2
DESCRIPTION
Side-by-side merge of file differences.
-o FILE --output=FILE
Operate interactively, sending output to FILE.
-i--ignore-case
Consider upper- and lower-case to be the same.
-E--ignore-tab-expansion
Ignore changes due to tab expansion.
-b--ignore-space-change
Ignore changes in the amount of white space.
-W--ignore-all-space
Ignore all white space.
-B--ignore-blank-lines
Ignore changes whose lines are all blank.
-I RE --ignore-matching-lines=RE
Ignore changes whose lines all match RE.
--strip-trailing-cr
Strip trailing carriage return on input.
-a--text
Treat all files as text.
-w NUM --width=NUM
Output at most NUM (default 130) print columns.
-l--left-column
Output only the left column of common lines.
-s--suppress-common-lines
Do not output common lines.
-t--expand-tabs
Expand tabs to spaces in output.
--tabsize=NUM
Tab stops are every NUM (default 8) print columns.
-d--minimal
Try hard to find a smaller set of changes.
-H--speed-large-files
Assume large files and many scattered small changes.
--diff-program=PROGRAM
Use PROGRAM to compare files.
-v--version
Output version info.
--help Output this help.
If a FILE is `-', read standard input. Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
AUTHOR
Written by Thomas Lord.
REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>.
COPYRIGHT
Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for sdiff is maintained as a Texinfo manual. If the info and sdiff programs are properly installed at your site,
the command
info diff
should give you access to the complete manual.
diffutils 2.8.7-cvs January 2008 SDIFF(1)