If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Curl in shell help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-08-06, 10:16
fxa33 fxa33 is offline
Registered User
 
Join Date: Nov 2006
Posts: 2
Curl in shell help

I am trying to get (ftp) file from one of the web site. I want to delete the file after the file is transferred completely.

I want to make sure that I get only current date ( MMDDYYYY) file appended at the end of the file name.

File Name : XXXXX_MMDDYYYY SIZE: 12457878 bytes


I am using "curl" command. Also, I would need the file size so that I can compare file downloaded file size.

Any help is appreciated.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 11-08-06, 10:33
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
Cool


This post can be categorized as a request for help online where "you don't know how to do your job and are looking for somebody to do it for you".

You need to perform some effort on your own if you want to receive assistance.

-- Or -- We could do it for a Fee $$$


__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
  #3 (permalink)  
Old 11-10-06, 13:55
fxa33 fxa33 is offline
Registered User
 
Join Date: Nov 2006
Posts: 2
I am not asking you to write the code for me. I think you are trying to use this forum to make money...
Reply With Quote
  #4 (permalink)  
Old 11-10-06, 16:43
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
Show us what you have coded and what portion is not working.
FYI: some ftp servers will allow ls "-lrt"
try it in place of sorting dir output

getfile () {
set -- `ftp localhost <<ftp-end | tail -1 | tr -s " "
ls "-lrt /mydir"
ftp-end
`
sz=$5
mth=$6
day=$7
filenm=$9
}
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On