[Gllug] Controlling ftp from a program/commandline

salsaman at xs4all.nl salsaman at xs4all.nl
Thu Sep 30 23:26:44 UTC 2010


Hi,
I am trying to do something like this:

$ mkfifo fifo
$ ftp ftp.example.com < fifo

$ echo username > fifo
$ echo passwd > fifo


but actually from within a C program. The problem is it doesn't work, ftp
seems to need the username and password from an actual terminal.


I can't do e.g:

ftp < script.file
because the commands for ftp are generated at runtime.

Any suggestions how to get it to do what I want, i.e write to the stdin of
ftp ?



Cheers,
Salsaman.


-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list