Sponsored Content
Full Discussion: Print the difference
Top Forums Shell Programming and Scripting Print the difference Post 302395190 by malcomex999 on Monday 15th of February 2010 08:22:19 AM
Old 02-15-2010
how are you checking the difference?
what is it based on?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

to compare two files and to print the difference

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

Compare two files and print the two lines with difference

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

Compare selected columns from a file and print difference

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

Compare two columns in two files and print the difference

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

How to detect difference between files and print the differences

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

What's the difference between print and printf in command?

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

Compare file1 for matching line in file2 and print the difference in matching lines

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

Simple awk command to compare two files and print first difference

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

Compare two variables and print the difference

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

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
SGMLDIFF(1)															       SGMLDIFF(1)

NAME
sgmldiff - Find differences in the markup of two SGML files SYNOPSIS
sgmldiff [ options ... ] file1 file2 [ -a | --attributes | -c [ attributes | nesting | textpos ] | --context [ attributes | nesting | textpos ] | -s | --statistics | -h | --help | -v | --version ] DESCRIPTION
This perl script allows to determine the structural differences between two SGML files. It compares the files, regardless of what is in between the tags, to only focus on the markup. Its output is similar to diff(1). The typical use of sgmldiff is to compare an SGML file with its translation into another language. If the translation was done cleanly, sgmldiff returns without finding any difference in the markup. An example of a typical call to sgmldiff is: sgmldiff english.sgml italiano.sgml If there are differences in markup between both files, sgmldiff will output a series of differences reports summarized with lines of the form: 169a164 At line 169 of the first file, line 164 of the second file has been added. 8a12,15 At line 8 of the first file, lines 12 to 15 of the second file have been added. 41d28 Line 41 of the first file has been destroyed, to obtain line 28 of the second file. 63,66d61 Lines 63 to 66 of the first file have been destroyed. to obtain line 61 of the second file. 52c51 Line 52 of the first file has been changed into line 51 of the second file. 5,7c8,10 Lines 5 to 7 of the first file have been changed into lines 8 to 10 of the second line. In addition to those summaries, the lines of the first file are shown preceeded by '<' and the lines of the second file are shown preceeded by '>". OPTIONS
Here is the list of actions that can be requested to sgmldiff: [ -a | --attributes ] Include the attribute values in the difference tests. Don't set this value if the attributes are likely to be translated. Set this value if the attributes value shouldn't change between both files. Default is to don't include the attributes in the difference tests. [ -c [ attributes | nesting | textpos ] | --context [ attributes | nesting | textpos ] ] Add more context to the difference. Since every test between the tags is removed before testing the differences, sgmldiff is likely to resynchronize itself at the wrong place, by thinking the location in both files correspond, while it's not true. By adding more context to the compared area, such risk is disminished. The allowed values for the --context option are: attributes Take into account the attribute names. The attribute values are controlled by the attributes option. nesting Take into account the nesting level of all the compared tags. textpos Take into account the position in the text. [ -s | --statistics ] Print some SGML information at the end. [ -h | --help ] Print a short help message and exit [ -v | --version ] Print the version identifier and exit FILES
AUTHORS
Frederik Fouvry Developer of sgmldiff. SEE ALSO
jw(1) conversion from a SGML file to other file formats nsgmls(1) a base component of Jade DSSSL engine http://sources.redhat.com/docbook-tools/ <URL:http://sources.redhat.com/docbook-tools/> the home page of the DocBook tools, a compendium of all tools necessary to process DocBook files, including the DocBook-utils 11 February 2004 SGMLDIFF(1)
All times are GMT -4. The time now is 06:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy