Results 1 to 2 of 2
hi friends
i need to take a backup from one remote system and send it to server through ftp
i need to automate these commands in a file by giving ...
- 08-24-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 3
how to automate ftp commands
hi friends
i need to take a backup from one remote system and send it to server through ftp
i need to automate these commands in a file by giving user name and password for database as well as ftp as argument
thougth i am having little bit of knowledge in shell scripts very new to ftp scripts
so help needed! it would be appriciated
Regards
Vajiramani
- 08-24-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
You can put the ftp commands in a here document.
An example:
RegardsCode:#!/bin/sh HOST='host.com' USER='vaji' PASSWD='passwd' ftp -i -n $HOST <<EOF user ${USER} ${PASSWD} binary cd /home get my.pdf quit EOF


Reply With Quote