08-23-2012
In the error msg the filename that cannot be opened appears to have three trailing <newline> chars. Are you sure that this is what you want? You better double check the filename composing.
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. UNIX for Dummies Questions & Answers
I have to compare two files for any differences, then output the lab and question number for any differences. This is what I currently have:
diff lab2.txt lab2answer.txt > lab2compare.txt
Though the output doesn't have to be sent to a .txt (or any sort of log), I found that easier, at least... (2 Replies)
Discussion started by: Joesgrrrl
2 Replies
3. 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
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
Hi there,
I'm sure this question has been asked many times but I can't find any posts with information.
How can I check the differences between say lines 20 - 200 in file1 and lines 420 - 600 in file2?
Thanks in advance for any help!
js (2 Replies)
Discussion started by: js8765
2 Replies
6. Shell Programming and Scripting
I know the diff does this but it does output more info than just the different text
(e.g.
$ diff file1 file2
29a30
> /home/alex/Pictures/hello.jpg
1694a1696
> /home/alex/Pictures/hi.jpg
)
How can I make it output only
/home/alex/Pictures/hello.jpg
/home/alex/Pictures/hi.jpg
?
thank... (2 Replies)
Discussion started by: hakermania
2 Replies
7. Shell Programming and Scripting
It seems like a common task, but I haven't been able to find the solution.
vitallog.txt
1310,John,Hancock
13211,Steven,Mills
122,Jane,Doe
138,Thoms,Doe
1500,Micheal,May
vitalinfo.txt
12122,Jane,Thomas
122,Janes,Does
123,Paul,Kite
**OUTPUT**
vitalfiltered.txt
12122,Jane,Thomas... (2 Replies)
Discussion started by: charles33
2 Replies
8. Shell Programming and Scripting
Hi all,
i have 50 files .data should be same in these 50 files , so my task is to find the difference. i need a logic , which finds difference between all files and print in output file with file name where it found that difference .
i tried below logic , but its not giving me what i want.
let... (2 Replies)
Discussion started by: deepakiniimt
2 Replies
9. Shell Programming and Scripting
I have 2 files of almost same text apart from 2,3 ending lines. Now I want to get that difference in another file.
e.g file1.txt is
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_livecd-lv_root
18G 2.4G 15G 14% /
tmpfs 504M ... (12 Replies)
Discussion started by: kashif.live
12 Replies
10. Shell Programming and Scripting
Hi All,
Am trying script to compare 2 files and print the difference found from old file to new file on line by line basis on side by side display.
Basically line by line comparision and files may contain blank line as well
I know we have compare/diff commands but i don't how to make... (10 Replies)
Discussion started by: Optimus81
10 Replies
LEARN ABOUT DEBIAN
sgmldiff
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
12 September 2012 SGMLDIFF(1)