diffing special chars

Góra strony
Załączniki:
Wiadomość jako email
+ (text/plain)
Delete this message
Reply to this message
Autor: Kevin Buettner
Data:  
Temat: diffing special chars
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";