SunQuest
           FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old May 18th, 2004, 12:16 PM
Trent Hatred Trent Hatred is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Victoria, B.C.
Posts: 55 Trent Hatred User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 3 m 43 sec
Reputation Power: 5
Auto FTP via a shell script? Not working so well...

Hey Folks,

I'm trying to setup a shell script to download a new price list every night. Here's what I've tried thus far:

Using WGET:
Code:
# !/bin/bash
cd /var/www/html/imports
wget ftp://user:pass@ftp.tdata.com/PRICE.ZIP


Works, but retrieves the file with an appended %0D when run through via a script. If I type it in at a shell prompt, it doesn't add the %0D. Anybody happen to know why?

I've also tried the following:

Code:
# !/bin/bash
ftp -n -i <<-here
open foo.bar.com
user <user> <passwd>
bin
get somefile.gz
bye
here 


But it never actually connects.

If anyone can offer some better insight into this, that would be great. All I require it to do is download a .zip file nightly. The rest of the processing (unzipping/MySQL imports etc) I have no problem with.

Thanks much,
B

Reply With Quote
  #2  
Old May 18th, 2004, 12:57 PM
Trent Hatred Trent Hatred is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Victoria, B.C.
Posts: 55 Trent Hatred User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 3 m 43 sec
Reputation Power: 5
Please ignore my own stupidity.

Using a new text editor which happened to add ^M to the end of each line in my scripts.

*slaps self*
B

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Auto FTP via a shell script? Not working so well...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway