[ale] Stumped-

Dustin Puryear dpuryear at puryear-it.com
Thu Mar 11 10:35:47 EST 2010


That will be nasty, nasty in bash. You would probably need to do this:

for each directory d
 create a file X.d that has a listing of filenames in d
done

for each file X.*
 scan each other file X.* for a match
 if a match found
  compare left.file.size with right.file.size
  print if ...
 end-if
done 

The problem you're going to have is you can't store this in memory with
a good 2-dim array or hash like with perl or python, so you have to use
a bunch of scratch files.

Well, hmm, doesn't bash support some weird array structure:

http://tldp.org/LDP/abs/html/arrays.html

Those are 1-dim arrays though.

---
Puryear IT, LLC - Baton Rouge, LA - http://www.puryear-it.com/
Active Directory Integration : Web & Enterprise Single Sign-On
Identity and Access Management : Linux/UNIX technologies

Download our free ebook "Best Practices for Linux and UNIX Servers"
http://www.puryear-it.com/pubs/linux-unix-best-practices/

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Dave
Weiner
Sent: Thursday, March 11, 2010 9:15 AM
To: Atlanta Linux Enthusiasts - Yes! We run Linux!
Subject: Re: [ale] Stumped-

Dennis Ruzeski wrote:
> Exactly- I need to look in images and movies for the same file name
> with different sizes for each client.

So you need to loop through all the files in the images dir for client1
and check for files with the same name in the other 9,999 image
directories?

> 
> --Dennis

Dave
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo



More information about the Ale mailing list