Jul 7, 2003 #1 specv Programmer Aug 8, 2001 42 CA Hi all, I want to send with ftp in a unix batch file. I try some combinaison but look like impossible. ftp serverName username password put test test2 close quit Can you help me with this code? Thanks, Phil
Hi all, I want to send with ftp in a unix batch file. I try some combinaison but look like impossible. ftp serverName username password put test test2 close quit Can you help me with this code? Thanks, Phil
Jul 7, 2003 1 #2 vgersh99 Programmer Jul 27, 2000 2,146 US ftp <<EOF open serverName user username password put test test2 quit EOF vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
ftp <<EOF open serverName user username password put test test2 quit EOF vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Jul 7, 2003 Thread starter #3 specv Programmer Aug 8, 2001 42 CA Hi vlad, I try your code. When I start the script look like to want my password : dcegdmd@sda2 ==> script.sh Password: Name (serverName:dcegdmd): I try to type my password and press enter and I have this message : Login incorrect. Login failed. Please login with USER and PASS. Please login with USER and PASS. dcegdmd@sda2 ==> Do you have an idea? Thanks, Phil Upvote 0 Downvote
Hi vlad, I try your code. When I start the script look like to want my password : dcegdmd@sda2 ==> script.sh Password: Name (serverName:dcegdmd): I try to type my password and press enter and I have this message : Login incorrect. Login failed. Please login with USER and PASS. Please login with USER and PASS. dcegdmd@sda2 ==> Do you have an idea? Thanks, Phil
Jul 7, 2003 #4 vgersh99 Programmer Jul 27, 2000 2,146 US You have to set your 'serverName', 'username', 'password' shell variable first. Then supply the values of the variables in the script #------------------------ serverName=myServerIP username='myUserName' password='myUserPassword' ftp <<EOF open ${serverName} user ${username} ${password} put test test2 quit EOF vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
You have to set your 'serverName', 'username', 'password' shell variable first. Then supply the values of the variables in the script #------------------------ serverName=myServerIP username='myUserName' password='myUserPassword' ftp <<EOF open ${serverName} user ${username} ${password} put test test2 quit EOF vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Jul 7, 2003 1 #5 Ygor Programmer Feb 21, 2003 623 GB Use ftp -n to disable auto-login. Upvote 0 Downvote
Jul 7, 2003 #6 vgersh99 Programmer Jul 27, 2000 2,146 US ooops - missed that one. vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
ooops - missed that one. vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Jul 7, 2003 Thread starter #7 specv Programmer Aug 8, 2001 42 CA Thanks Vlad and Ygor with the -n all is ok! Phil Upvote 0 Downvote