[ale] Stumped-

Tim Watts timtw at earthlink.net
Thu Mar 11 11:08:31 EST 2010


So perhaps the stumbling block is parsing out the size for each file
pair. Try this:

sizeA=$(stat --printf "%s\n" "images/$filename")
sizeB=$(stat --printf "%s\n" "movies/$filename")
if [ "$sizeA" -ne "$sizeB" ]; then
	# do whatever...
fi

But to get filename you might want to just iterate thru images/, test
for existence in movies/ then do the above test if found:

for $filename in $(find $client -name "$client/images"); do
  ...
done

As usual, salt to taste...

BTW $(command) is a "better" form of `command` (more readable)


On Thu, 2010-03-11 at 10:33 -0500, Dennis Ruzeski wrote:
> Same client-
> 
> I can get the file listings, I'm having a problem with the file size comparison.
> 
> 
> 
> On Thu, Mar 11, 2010 at 10:31 AM, Dennis Ruzeski <denniruz at gmail.com> wrote:
> > The direction  I've been going in is to do something like this-
> >
> > for dir in `ls /client`
> > do diff -s $dir/images $dir/movies |grep ^F |xargs ls -l
> > done
> >
> >
> >
> > On Thu, Mar 11, 2010 at 10:26 AM, Dennis Ruzeski <denniruz at gmail.com> wrote:
> >> Same name but different size.
> >>
> >>
> >>
> >> On Thu, Mar 11, 2010 at 10:14 AM, Dave Weiner <davew at coyotetechnical.com> wrote:
> >>> 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
> >>>
> >>
> >
> 
> _______________________________________________
> 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


________
I suppose that I shall have to die beyond my means.
-- Oscar Wilde, upon being told the cost of an operation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part
Url : http://mail.ale.org/pipermail/ale/attachments/20100311/f217fd77/attachment.bin 


More information about the Ale mailing list