Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2006
    Posts
    2

    Unanswered: 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.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    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

  3. #3
    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...

  4. #4
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    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
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •