Posts

Showing posts from December 13, 2009

Automating FTP Session through Shell Script

Image
Many times we save lot of time if we automate things. Assume you want to put a fine named abcd.doc in server named www.myserver.com. We will do as follows in terminal/command prompt ftp www.myserver.com Then it will ask for USERNAME and PASSWORD, if we enters correctly FTP session for us opened successfully. Then we can use ftp commands to put/get files to/from www.myserver.com. For putting abcd.doc we will use command put as follows ftp>put abcd.doc Then we will use bye to exit ftp session ftp>bye Automating above session through shell script Assume user name is usermane and password password for logging into system www.myserver.com user username password put abcd.doc close bue SCRIPT exit 0 You can use IP address also instead of server name.

Automating FTP Session through Shell Script

Many times we save lot of time if we automate things. Assume you want to put a fine named abcd.doc in server named www.myserver.com We will do as follows in terminal/command prompt ftp www.myserver.com Then it will ask for USERNAME and PASSWORD, if we enters correctly FTP session for us opened successfully. Then we can use ftp commands to put/get files to/from www.myserver.com. For putting abcd.doc we will use command put as follows ftp>put abcd.doc Then we will use bye to exit ftp session ftp>bye Automating this session Assume user name is usermane and password is password for logging into system www.myserver.com ftp -n www.myserver.com <