diffing special chars

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: sinck@ugive.com
Date:  
Subject: 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";
\_ 


Sooo many lines....

perl -MFile::Find -e \
'find sub {print $File::Find::name, "\n";}, shift || "."' \
your-optional-dir-here

On the downside, this version doesn't sort. :-)

David