I have created bash script for create dump of svn repositories. I want to add such functionality that after dump of every repository script send it to remote server using rsync and delete from dump location and after that starts to make dump of next repository. I am using following script.script has some errors help me to improve it. #!/bin/sh# Record todays date# --------------------bakdate=$(date +%Y%m%d)echo --------------------------------echo Running SVN backup $bakdateecho --------------------------------\n# From where to backup repos?# ---------------------------svnrepos=/kk/svn/echo \nGoing to backup all SVN repos located at: $svnrepos \n# Where to save the dump?# ------------------------bakdest=/save/# Location of remote server (to copy backup)# ----------------------------------------baktoremote=root@192.168.11.156:/kk   cd $svnrepos# Just make sure we have write access to backup-folderif [ -d $bakdest ] && [ -w $bakdest ] ; then  # Now $repo has folder names = project names  for repo in *; do    # do svn dump for each project    echo Taking backup/svndump for: $repo    echo Executing : svnadmin dump $repo >$bakdest/$repo-$bakdate.dump \n    # Now finally execute the backup    svnadmin dump $repo > $bakdest/$repo-$bakdate.dump# Just make sure we have write access to backup-folderif [ -d $bakdest ] && [ -w $bakdest ] ; then  # Now $repo has folder names = project names  for repo in *; do    # do svn dump for each project    echo Taking backup/svndump for: $repo    echo Executing : svnadmin dump $repo >$bakdest/$repo-$bakdate.svn.dump \n    # Now finally execute the backup    svnadmin dump $repo > $bakdest/$repo-$bakdate.dump    # sent it to remote server  rsync -avP $bakdest/$repo-$bakdate.dump $baktoremote  # delete repository after sending      rm -rf $repo-$bakdate.dump    fi
svn backup bash script errors
bash;subversion
End your if blocks with fiEnd your loops with doneEach if must be matched by one fi, and each do must be matched by one done.