diffing special chars

Kevin Buettner kev@primenet.com
Thu, 24 Aug 2000 09:42:38 -0700


On Aug 23, 11:12pm, der.hans wrote:

> Anyone know a solution that doesn't require brute forcing with tools like
> perl or sed/awk?

Why don't you want to use perl?  It's a perfectly acceptable tool for
this job.  Below is a little script which'll list out verbatim the
names of the files regardless of the embedded control characters,
spaces, etc.  Use it to create your file lists and then use diff on
them as before.

#!/usr/bin/perl -w

use File::Find;

my ($root) = @ARGV;

die "Usage: $0 root\n"		unless defined ($root);

my @names = ();

find(sub { push @names, $File::Find::name; }, $root);

print join "\n", sort @names;
print "\n";