develooper Front page | perl.beginners | Postings from February 2002

RE: append local file to remote file

Thread Previous
From:
Bob Showalter
Date:
February 8, 2002 07:37
Subject:
RE: append local file to remote file
Message ID:
2E4528861499D41199D200A0C9B15BC031B814@taylorwhite.com
> -----Original Message-----
> From: Alex Harris [mailto:atkharris@hotmail.com]
> Sent: Thursday, February 07, 2002 3:08 PM
> To: beginners@perl.org
> Subject: append local file to remote file
> 
> 
> Apologies for the loosely interpreted perl issue below.
> 
> I have rsh on my system and nothing else is available that I 
> know of.  I 
> need to send a local file to a remote system and APPEND the 
> local file to 
> the remote file.  All I can find in the man pages however is 
> how to do just 
> the reverse.  I realize that I can rcp it over then do the 
> remote file 
> append to remote file, but I'd like to do the whole process 
> in ONE step not 
> two.  Any ideas?  Anything in Perl?

Does the remote system have ftp running? If so, you could use
the Net::FTP module to append to the remote file.

Or, if you want to use rsh, how about something like:

  $ rsh remotehost 'cat >>remotefile' <localfile

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About