#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    46
    Rep Power
    14

    Question Not even sure if you can do this...


    Hi,

    I have a .sh script that runs commands against a log file. when the script is finished running it redirects the output into a txt file. Is there a way to ftp it from the remote host to a folder in my local host? I know how to ftp it over from the remote host using the get command from a cmd window, but is there a way to put this into the script itself so that the user will not have to open up a cmd window and get the file, but instead have the script run and they can just click on the output.txt file in their folder, and that file will have the output of the script?

    -Does this make sense?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Posts
    60
    Rep Power
    14
    Hiya,
    I think a here document is what you want...
    Something like:

    ftp node <<END_OF_FTP
    some ftp commands
    END_OF_FTP

    Note that you must not have any spaces before of after the END_OF_FTP (or whatever text you want to use) ...

IMN logo majestic logo threadwatch logo seochat tools logo