This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
manoj r patil
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rahul Chaudhari
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic