diffing special chars

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: KevinBuettnerkev@primenet.com
Date:  
Subject: diffing special chars
On Aug 24, 4:39pm, der.hans wrote:

> Maybe I should just admit that shell sucks and move completely to perl
> ;-). Shell's nice for simple stuff, though.


I used to do a lot of shell programming. I don't anymore. If I find
myself writing a shell script that ends up being longer than six lines
(or so), I switch to Perl.

> Also, I think it's a great way
> to get people used to using the command line. Just as command line
> editting is great way to get them to learn vi or emacs :).


I agree.

> This works well. David's one liner is probably better because I'm
> manipulating 60+MB files and I don't really want the whole thing in one
> var :).


I'm puzzled by this statement. In the script I sent, you ended up
with the names of all of the files in a single (array) variable so
they could be sorted later on. The actual contents of the files were
never actually read. Surely you don't mean that your filename data is
60+MB, do you?

Regardless, you really do need to do the sort, because you can't rely
on find (or Perl's File::Find) to list the files in any particular
order. If you want to diff two lists of files to see what's been
added or deleted, you'll need to do some ordering on the list. You
don't need to sort in perl though. You could just use the sort program,
but AFAIK, the data will still end up in memory.