[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 2756

From: Blair Zajac <blair_at_orcaware.com>
Date: 2002-07-28 19:38:25 CEST

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

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.