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,"){ 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);