in reply to extract useful infos from cvs diff output
#!/usr/bin/perl -w use strict; use Text::Tabs; # core module die "Usage: real_diff.pl file.txt [file2.txt ..]\n" unless @ARGV; my $prev_line; my $file; while(<>) { $file = $1 if /^RCS file: (.*?),/; if(/^.{62}[<>\|]/) { if(not $prev_line or $prev_line < $. - 1) { print "=" x 70, "\n"; print "Line number in $ARGV.txt: $.\n"; print "Source file name: $file\n\n"; } print expand($_); $prev_line = $.; } }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: extract useful infos from cvs diff output
by pg (Canon) on Jan 31, 2003 at 06:46 UTC | |
by jeffa (Bishop) on Jan 31, 2003 at 13:35 UTC | |
by Aristotle (Chancellor) on Jan 31, 2003 at 13:48 UTC | |
by Aristotle (Chancellor) on Jan 31, 2003 at 13:06 UTC |