I've just compiled a software. This software automatically connect the web site (via several scripts) and retrieve data. Web sites ftp service use e-mail address as a password. Username: Anonymous.

In documentation of the installation, the below scripts are given to connect ftp without any problem.

set host =\hostname | \awk -F. '{print $1}'
set dom =\hostname | \awk -F. '{print $2}'
if( $dom == '' ) then
alias hostname 'echo $host.mit.edu'

How I need to modify (or should I write as it appears) these scripts to allow the related scripts to retrieve data from the ftp. I also need to know what this scripts doing.

Thanks in advance.


Not perhaps a direct answer; but I use a .netrc file:

cp ~/.netrc netrc.bak ; cp sqm-netrc ~/.netrc ; ftp ftp.anoth.er.uk ; cp netrc.bak ~/.netrc

machine ftp.somewebsite.com login username1.com password fgerghjvnfg machine ftp.anoth.er.uk login gdruug password vfohfgbsluv machine webhost.anoth.er.uk login vrfkbv password fbgvnfebuhb macdef init cd public_html cd sqm put sqm.txt

This logs in, performs different actions depending where it's logged in, & quits; leaving the control file safely tucked out of the way afterwards. I haven't simplified this, just obfuscated it a little!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.