Sure someone out there can point out what i'm doing wrong... Cant get this to loop correctly through all the results of the find command. running this in AIX.
Essentually i'd like it to find all the files 1 day old and then cat them all into one file.
#! /bin/sh
p1='/MSS-Storage/data/DataExport/runlog'
p2='/MSS-Storage/apps/scripts'
x=1
find $p1/* -mtime -1 -type f >> $p2/tmp.txt
for period in `cat $p2/tmp.txt`
do
echo "************************Export $x*************************/
*************************************************" > $p2/`date +summary.\%Y\%m\%d_\%H\%M.log`
cat $period > $p2/`date +summary.\%Y\%m\%d_\%H\%M.log`
x=$x+1
done