On Wed, 29 Dec 2004, McKown, John wrote:

> Date: Wed, 29 Dec 2004 11:53:19 -0600
> From: "McKown, John" <[EMAIL PROTECTED]>
> Reply-To: Linux on 390 Port <[email protected]>
> To: [email protected]
> Subject: ftp question, not really Linux
>
> I hope ya'll don't mind. This is really more of a generic UNIX ftp type
> question. Suppose that I have a program whose output I want to go to a
> remote system. Futher suppose that said remote system only have ftp
> capability. I cannot use NFS, Samba, netcat, ... . Well, the remote
> system is a Windows system. 'Nuff said.

Are you sure that your FTP client doesn't already support
this feature?  I've done this on Linux as well as at least
one version of Unix.

>From "man ftp":

   If the first character of the file name is '|', the
   remainder of the argument is interpreted as a shell
   command.  Ftp then forks a shell, using popen(3) with
   the argument supplied, and reads (writes) from the
   stdout (stdin).  If the shell command includes spaces,
   the argument must be quoted; e.g.  ``" ls -lt"''.  A
   particularly useful example of this mechanism is:
   ``dir more''.

For example:

   $ ftp myisp.com
   ...
   ftp> put "|cat /etc/hosts" myhosts
   local: |cat /etc/hosts remote: myhosts
   200 PORT command successful
   150 Opening BINARY mode data connection for myhosts
   226 Transfer complete.
   377 bytes sent in 0.00 secs (3916.6 kB/s)

[snip]

> Hope everybody had a good holiday.

Thanks and may each of you have a blessed new year!

Paul

> --
> John McKown
> Senior Systems Programmer
> UICI Insurance Center
> Information Technology
>
> This message (including any attachments) contains confidential
> information intended for a specific individual and purpose, and its'
> content is protected by law.  If you are not the intended recipient, you
> should delete this message and are hereby notified that any disclosure,
> copying, or distribution of this transmission, or taking any action
> based on it, is strictly prohibited.

[snip]

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to