Here is the script which I write, but I am uncertain about the script.
RCTFILES=`find . -type f -mmin -20`
"$RCTFILES > $5"
while read line
for i in `cat /tmp/repos`; do cd $REPOLOC; sleep 1; rm -rf $i && svnadmin load $REPOLOC/$i < $BACKLOC/$i/$line; done
Will explain it clearly! I am trying to write a SVN load script, but I am not sure using of "for" loop into the while loop is a good move?.
Scenario is, from the first server, dump files will be copied on to the second server on to the backup location (BACKLOC). RCTFILES tries to find the recent files which have come from the server1 in the backup location, and finds it, tries to store in its variable (RCTFILES). /tmp/repos has a list of repo names, but I used while loop in an skeptical mind to pass the stored value using the variable "RCTFILES" to this space " $REPOLOC/$i < $BACKLOC/$i/-----" as one by one. I don't know if I place a user-defined file descriptor, it will pass the value one by one; that's the reason, I gone for while loop. Correct this script, and do the needful. Thanks!