Finding cricket files and executing the rrdtool

hi

I am newbie to Unix and am trying to do some rrdtool searches. I am searching for all the rrd files which are in different directorys and then want to use uniq to sort them out. Once this is don't I wanted to echo the file name and append it to files before executing the rrdtool command to get the output. I am doing as below but it errors. Any advise how I Can achieve what I want to do?

  1. Find and sort all .rrd files which reside in multiple directory
  2. Input the filename for .rrd file in a output file rrdresults
  3. Execute rrdtool commands against the found

files and out rrdresults
[/list]

A=1447200000
B=1447833600
for I in `find /var/cricket/data/*/system.rrd -ls | awk '{print $11}' | unique '; do
   echo $I\n >> /var/tmp/rrdresults | /opt/rrd/bin/rrdtool fetch $I MAX --start $A --end $B >> /var/tmp/rrdresults
done

Hi chaps any help would be appriciated