Your own personal wrang-wrang (darth_spacey) wrote in rhlinux,
Your own personal wrang-wrang
darth_spacey
rhlinux

Piping a script to FTP?

I have a script something like
user root hackme
cd /pub/media
lcd /mp3
mget *.mp3
quit


I'm trying to pipe it to ftp via cat ftpscript |ftp -in foo (so I can automate it via a script called from cron), but when I try that, it returns me immediately to the command line, rather than running ftp and accepting the script as standard input. The man page for ftp does not state that it does anything unusual with stdio.

What am I doing wrong? How can I do it right?

Thanks for your time,
  • Post a new comment

    Error

    default userpic
  • 3 comments