All pastes #764549 Raw Edit

Unnamed

public text v1 · immutable
#764549 ·published 2007-11-07 10:55 UTC
rendered paste body
find . -name "*.[hc]" | xargs grep -P '\t' | cut -f 1 -d : | uniq > ../list_of_files_with_tabs



--------tabcleanup.pl-----------
#!/usr/bin/perl -w
use strict;

open(INPUT,"<list_of_files_with_tabs") or die "Couldn't find input";

while(<INPUT>){
    my $line = $_;

    chomp($line);
    print "Running tab2space on $line\n";

    my @tabargs = ("tab2space","-lf",$line,$line);
    system(@tabargs) == 0 or die "System call failed";
}
    
close(INPUT);