LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 12-17-2012, 12:08 AM   #1
sudiyanto24
LQ Newbie
 
Registered: Dec 2012
Posts: 1

Rep: Reputation: Disabled
HOW to create a bash script to download FTP?


Hi friends ...
I will make a bash script to donwload the file *. zipped through FTP.
FTP Serever:
http://ftp2.pegadaian.co.id/kanwil
username: "username"
password: "password"

in the FTP directory there are several folders according to the day, such as Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.

how to create a bash script to download the *. zipped by the name of the day is in the FTP directory?

my email : sudiyanto.ujank@gmail.com
 
Old 12-17-2012, 12:52 AM   #2
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,806

Rep: Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810
You don't really need a script, or at least not a long one. The following would work in bash:
Code:
wget --user=yourusername --password=yourpassword http://ftp2.pegadaian.co.id/kanwil/$(date +"%A")/*.zip
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create FTP users for Download Only hiep.pham Linux - Newbie 5 06-13-2012 07:57 PM
Create FTP users for Download Only hiep.pham Linux - Server 3 06-12-2012 02:15 PM
Bash script problem with ftp session exiting the script early edomingox Programming 5 02-23-2010 05:39 AM
Bash Script Help - Trying to create a variable inside script when run. webaccounts Linux - Newbie 1 06-09-2008 02:40 PM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration