I have the following bash script
the SFTP works fine but the echo "Backup done" dosnt work
#!/bin/sh
sftp -b /dev/stdin server <<EOF
cd /shares/backup/webserver/
put $bu_PATH$BACKUP_FILE
quit
EOF
echo "Backup done"
Can any one help?
|
|
EOF is not at the beginning of the line. Changing your script to:
should make it work. You might replace |
|||
|
|
|
That should be a lower-case "echo" instead of "Echo". |
|||
|
|
|
You might be able to improve the process a bit by just echoing the long string to the command. You would eliminate the hanging file created to hold those few lines:
Notice that the echo line continues over the CR's until another matching quote is discovered. |
|||
|
|