pftp

Интерактивный режим PFTP

pftp -i $HOST <<+
cd /Volume_1/
send /backups/$FILE /Volume_1/backups/$HOST/$FILE
delete /Volume_1/backups/$HOST/$OLD_FILE
+