Hi guys. Very new to this so apologies if this is ridiculously obvious, but I am not sure why this isn't working. I want to pull a file off an FTP server. I currently do it through windows, which is no problem, but I want to move everything to a Linux box I just installed. wget won't work as the remote directory isn't part of the root directory as defined in the FTP server.
The script is as below. It connects to the ftp, but just sits at the ftp> prompt and goes no further. I do not know why it isn't sending the username and password and completing the script? Can anyone shed any light? I've googled and it seems like it should work...?
Last edited by Scott; 12-18-2012 at 01:47 PM..
Reason: Code tags
Please always use code tags when posting any code fragments or data samples. If you are not sure how to use code tags, then please have a look at this forum video tutorial
You need to tell it what to do. What you have is a script that will start FTP and then wait until it ends before carrying on and trying to execute the next line, i.e. quote user login password
To get this to be seen as input to the ftp command, you will need to wrap it up a little:-
The EOFTP label at the end marks where the input stops. Mind you, I'm writing this as a ksh writer with very limited bash experience at the moment, so this may not work, but give it a go.
If you indent your code to make it more readable, the EOFTP at the end cannot be space indented or it will be ignored. Use the Tab key instead.
We were all new to it once too - and it's nice to have someone display pleasure rather than the usual blank we probably all get at work. Thanks for that
Did it do the trick?
I am writing a bash script that will find all references to the “Well_List” in the “Comp_File”.
I am filtering a Well_List that contains the following:
TEST_WELL_01
TEST_WELL_02
TEST_WELL_11
TEST_WELL_22
GOV_WELL_1
GOV_WELL_201
PUB_WELL_57
PUB_WELL_82
.
.
Comparison... (5 Replies)
I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output.
Is it possible to transfer files from Windows server to unix server through any shell script?
If so can you please help me with the details.
Thanks in... (8 Replies)
Hello, fellow computer junkies. First time poster! My boss wrote an application (Mavericks 10.9, Mountain Lion 10.8) that checks a user's security settings. The user runs the application, then it spits out an email that is sent back to our inbox showing the results. On our end, we have a mail rule... (5 Replies)
How to FTP (get multiple) unix files to windows using visual basic 6.
I am a list of files in my unix location, need to ftp those files to windows machine using Visual basic 6 or VBA macros.
Thanks in Advance (3 Replies)
Hi,
I'm new to shell script..I have one requriement like -
In one server have more than one files,I want to ftp those files to some otehr server..
Ex : test1.pdf
test2.pdf
Please suggest me how to do (3 Replies)
I have a variable embedded in a long string called "commands" coming in on a query_string. I need to copy the string to a file with the variable $loop1 converted before it writes. Right now, it writes the varible itself instead of what it should be.
QUERY_STRING... (2 Replies)
Hi ,
We are facing a weird problem in our project. we need to send some xml & audio files to a remote FTP server from a Linux box, we are doing this in Perl script using Net::FTP->. Issue here is.. when FTPed the files using Perl scripts, only empty files ( 0 byte) are getting created on the... (2 Replies)
Hi,
I am writting a shell script which will pull a list files (mentioned in one file 1.txt) from external FTP site (for ex: ftp://abcd.efghijk.com/). The 1.txt is in my local unix directory. I have username and password to connect the external FTP site.
Also before I pull the files, I need... (0 Replies)
Hi,
I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)