Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am new to shell scripting, I just want to make my work automate by making a single shell scripting program for downloading the data from ftp server to my local system.
I googled and find some scripting for this task. but none of them is working fine on my Fedora 14 system.
Guys please give me some idea about this how could i make my task automate.
Hi,
I am new to shell scripting, I just want to make my work automate by making a single shell scripting program for downloading the data from ftp server to my local system. I googled and find some scripting for this task. but none of them is working fine on my Fedora 14 system. Guys please give me some idea about this how could i make my task automate.
So you're an RHCE, and can't write a simple shell script?? And you say you Googled, but don't bother telling us what you used/tried, what error(s) you get, or what problems you're having, so how can we help??
Since you're an RHCE, you should have at least heard about the expect command, and using it to automate such things...and since you've Googled, you've probably found one of the MANY examples on using expect to perform FTP tasks.
So you're an RHCE, and can't write a simple shell script?? And you say you Googled, but don't bother telling us what you used/tried, what error(s) you get, or what problems you're having, so how can we help??
Since you're an RHCE, you should have at least heard about the expect command, and using it to automate such things...and since you've Googled, you've probably found one of the MANY examples on using expect to perform FTP tasks.
TBone => Yes i tried to make a script but its stucks after taking the username and its not move to next line for the password.
To be a certified some time its happen we cant make the simple thing,instead we do a thing which is not simple as its look.
I totally agree with TBone that you did not search on google nor did you read ftp manpage because if you would have then you have got the answer by now.
Anyways, in the beginning of your script put the following line:
This will make your user to login without the need of entering password. Remember the password will be plain text. I have not tried hashing it but you could.
Last edited by T3RM1NVT0R; 01-21-2012 at 07:52 PM.
I agree with both TB0ne and T3RM1NVT0R.
You can also use .netrc to avoid putting passwords all over your scripts' ftp connections.
Besides, here documents will be of help automating the task.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.