Here is my script:[root@hostname ~]# cat ontape.sh#!/bin/bash#sshpass -p 'PASSWORD' ssh root@hostname mkdir -p /home/mybackup/ontape/$(date +%Y-%m-%d)sshpass -p 'PASSWORD' ssh root@hostname mkdir -p /mybackup/ontape_tmp_backup/$(date +%Y-%m-%d)for server in $(cat servers.txt)do sshpass -p 'PASSWORD' scp /dbbackup/backupdb/ontape/fullsize/* $server/$(date +%Y-%m-%d)rm -f /dbbackup/backupdb/ontape/fullsize/* doneThe problem I am having is when this runs it copies only to the one server because it does the rm -f right after it finishes. Is there a way or how can I add a wait in there so it takes time to copy to both servers before deleting the file? 
rm -f in a script
scripting