![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sdiff issue - not gathering correct difference | thegant | UNIX for Dummies Questions & Answers | 1 | 05-07-2008 04:38 PM |
| HP-UX configuration gathering tool | ahaidukov | HP-UX | 0 | 08-30-2007 08:51 AM |
| Add new data using script | malaysoul | Shell Programming and Scripting | 1 | 02-09-2007 10:03 AM |
| Gathering system configuration | hcclnoodles | UNIX for Dummies Questions & Answers | 4 | 10-19-2004 11:10 AM |
| Gathering info on one line | HowardIsHigh | Shell Programming and Scripting | 5 | 06-24-2003 04:00 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Data gathering script
I am pretty new at shell scripting, but I managed to make a primative shell script to connect from my webserver (bluehost) to an external data server via ftp or sftp or whatever I need. This script is :
Code:
#!/bin/sh HOST='ftp.host.com' USER='username' PASSWD='password' FILE='file' ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD lcd /path/to/lcd get $FILE quit END_SCRIPT exit 0 |
|
||||
|
I'm not 100% sure what you are asking. I put the script into the same directory as the path I'm specifying in lcd. I know it's repetitive, but I wanted to make sure it would d/l to that path. My main problem is that ftp from my web server is disabled, which means that I have to download the data from the external data ftp server, and then upload the data to from my computer to the bluehost webserver. I need a way around this, if there is one. I need to directly get data from the external data server to the webserver, skipping me as the intermediate step.
PS: I do have a public_ftp folder, which I can setup for anonymous ftp, but I don't think this will have anything to do with any solution for my problem. |
|
||||
|
Am I correct in assuming that you want to initiate ftp on the bluehost web server to collect data from the external ftp server.
Then is the ftp program on the bluehost machine in the path that is available to you? |
|
||||
|
Yes. I have access to the location where I have the ftp script on the bluehost server, however, I do not think that I am allowed to initate ftp from the bluehost server due to security reasons. I am trying to find an alternative method for getting data automatically to my bluehost server.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|