Hi,
I have two similar directory structures. One is the latest dev environment and the other is a previous version of the same dev environment.
I need to do a diff on the .cpp .c .java and .h files.
Hence I need a list of all the files of the above pattern so that I can diff then... (3 Replies)
I created two computers with identical hardware, and run the benchmark programs in both starting at the same exact time.
What makes no sense is that the computer that has the lower average index (121) finished the race a good 30 minutes ahead of the computer wich showed the higher avg index... (0 Replies)
I have 3 files in directory mydir named as follows, I run the sequence of commands shown below and I have questions at the result.
File names are:
ABC_GP0
ABC_GP0.ctl
ABC_GPX
Commands and results:
$ ls /mydir/ | grep *
<-- (q1) I get nothing - OK
$ ls /mydir/ | grep... (5 Replies)
Hi, I've been running code which very frequently calls books.csv. e.g:
grep -i horror books.csv > tempExcept, I'm trying to move away from using temporary files or frequently calling books.csv to improve efficiency. So I tried something like
bookfile=$(cat books.csv)
grep -i horror... (4 Replies)
Hi
I want to compare 2 files. The files have the same amount of rows and columns. So each line must be compare against the other and if one differs from the other, the result of both must be stored in a seperate file.
I am doing this in awk.
Here is my file1:
Blocks... (2 Replies)
Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an error... (1 Reply)
Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an... (3 Replies)
Hi,
Is there a way to add padding to a diff result in unix so number of "< .." lines will be equal to number of "> .." lines?
For example, if the original result is:
9a10
> "line which exists only in one file"
The changed result would be:
9a10
< "noMatch"
---
> "line which exists... (5 Replies)
Discussion started by: Somename
5 Replies
LEARN ABOUT DEBIAN
text::worddiff::html
Text::WordDiff::HTML(3pm) User Contributed Perl Documentation Text::WordDiff::HTML(3pm)Name
Text::WordDiff::HTML - XHTML formatting for Text::WordDiff
Synopsis
use Text::WordDiff;
my $diff = word_diff 'file1.txt', 'file2.txt'; { STYLE => 'HTML' };
my $diff = word_diff $string1, $string2, { STYLE => 'HTML' };
my $diff = word_diff *FH1, *FH2, { STYLE => 'HTML' };
my $diff = word_diff &reader1, &reader2, { STYLE => 'HTML' };
my $diff = word_diff @records1, @records2, { STYLE => 'HTML' };
# May also mix input types:
my $diff = word_diff @records1, 'file_B.txt', { STYLE => 'HTML' };
Description
This class subclasses Text::WordDiff::Base to provide a XHTML formatting for Text::WordDiff. See Term::WordDiff for usage details. This
class should never be used directly.
Text::WordDiff::HTML formats word diffs for viewing in a Web browser. The diff content is highlighted as follows:
o "<div class="file">"
This element contains the entire contents of the diff "file" returned by "word_diff()". All of the following elements are subsumed by
this one.
o "<span class="fileheader">"
The header section for the files being "diff"ed, usually something like:
--- in.txt Thu Sep 1 12:51:03 2005
+++ out.txt Thu Sep 1 12:52:12 2005
This element immediately follows the opening "file" "<div>" element, but will not be present if Text::WordDif cannot deterimine the
file names for both files being compared.
o "<span class="hunk">"
This element contains a single diff "hunk". Each hunk may contain the following elements:
o "<ins>"
Inserted content.
o "<del>"
Deleted content.
You may do whatever you like with these elements and classes; I highly recommend that you style them using CSS. You'll find an example CSS
file in the eg directory in the Text-WordDiff distribution.
See Also
Text::WordDiff
Text::WordDiff::ANSIColor
Support
This module is stored in an open repository at the following address:
<https://svn.kineticode.com/Text-WordDiff/trunk/>
Patches against Text::WordDiff are welcome. Please send bug reports to <bug-text-worddiff@rt.cpan.org>.
Author
David Wheeler <david@kineticode.com>
Copyright and License
Copyright (c) 2005-2008 David Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2009-09-24 Text::WordDiff::HTML(3pm)