Karl Fogel wrote:
>
> blair@tigris.org writes:
> > Author: blair
> > Date: 2002-07-28 12:10:29 -0500 (Sun, 28 Jul 2002)
> > New Revision: 2756
> >
> > Log:
> > Go hog wild on all that stutt-stuttering going on.
>
> Oh my goodness. That... is... AMAZING....
>
> And you even found repeats separated by a line break :-).
>
> -Karl
Yes, it's a pretty cool script. I use it on all my articles and code.
I believe this is courtesy of Tom Christiansen.
#!/usr/bin/perl
undef $/;
$* = 1;
while ( $ARGV = shift ) {
if (!open ARGV) { warn "$0: cannot open `$ARGV' for reading: $!\n"; next; }
$_ = <ARGV>;
s/\b(\s?)(([A-Za-z]\w*)(\s+\3)+\b)/$1\200$2\200/g || next;
split(/\n/);
$NR = 0;
@hits = ();
for (@_) {
$NR++;
push(@hits, sprintf("%5d %s", $NR, $_)) if /\200/;
}
$_ = join("\n",@hits);
s/\200([^\200]+)\200/[* $1 *]/g;
print "stutter: $ARGV:\n$_\n" if length $_;
}
Just run
cd svn
find . -type f | grep -v '\.svn' | xargs stutter | less
Best,
Blair
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jul 28 19:39:07 2002