File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes how to redirect ftp output to a file from shell script? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to redirect ftp output to a file from shell script?" Watch "how to redirect ftp output to a file from shell script?" New topic
Author

how to redirect ftp output to a file from shell script?

manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
I have one cronjob bash script which is performing different ftp tasks. I want to ouput of the ftp commands to some file for some intermidiate processing. How can I do that from within the script?

Below is the sample extract of ftp I am using -

ftp 10.x.x.45 << INPUT_END

# different ftp commands...

INPUT_END


love your job and not your company;
...because you never know when your company will stop loving you!
Rahul Chaudhari
Greenhorn

Joined: Jul 30, 2008
Posts: 5
use fillowing line in your script. It writes the output of FTP in Specified file.

ftp 10.x.x.45 > FILENAME << INPUT_END

# different ftp commands...

INPUT_END
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to redirect ftp output to a file from shell script?