ftp script
I trying to automate an ftp script. it doesnot seem to be working. I can ftp manually with out problem. when done manually I can input username and password.
how do I input username and password in the script so the script will work? both machines have the same username and password I trying to ftp a file from redhat 9.0 to redhat 9.0 #bin/bash cd /home/david ftp 2.3.2.3 <<EOF put stuff.tar.gz bye EOF |
In this example, I'm using *.txt which you aught to be able to change for your needs.
Code:
#!/bin/bash |
thanks, but the script didn't help much.
Is there a way for autologin through ftp? |
Take a look at wget (http://www.gnu.org/software/wget/wget.html)
or rsync (http://rsync.samba.org/) or scp (part of SSH http://openssh.org/) Much simplier. |
Try Python (www.python.org) instead of sh/bash.
It would be something like: Code:
#!/sbin/python # location of python binary |
You are right! My first attempt was a bit lame. :(
So, I did some research and found a method that does work Code:
#!/usr/bin/expect -f |
All times are GMT -5. The time now is 06:19 AM. |