The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
file transfer using Ftp sudhi Shell Programming and Scripting 1 05-25-2008 08:14 PM
How to ftp a pipe file rainbow_bean AIX 3 04-21-2008 10:39 AM
Transfer the file manas_ranjan UNIX for Dummies Questions & Answers 2 07-27-2007 06:33 AM
file transfer bkan77 Shell Programming and Scripting 4 07-27-2007 02:55 AM
Pipe out ftp command to a file lweegp UNIX for Dummies Questions & Answers 2 10-10-2005 02:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-13-2007
Registered User
 

Join Date: Dec 2007
Posts: 5
Stumble this Post!
File transfer to a pipe

We were using ftp before and were able to pipe our files
get a1 p1 where p1 is pipe
this way we did not have to store files on our local server.

Now we are using sftp2 and in sftp2 get and mget are synonymous. When I do

get a1 p1

I get error p1: No such file or directory (it's looking for p1 on remote server)

I tried using scp (scp2) but it overwrites pipe with physical file.

Is there any other utility I can use to transfer file and read it in a pipe?

thanks
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-18-2008
Registered User
 

Join Date: Aug 2008
Posts: 1
Stumble this Post!
I think this will do what you are asking...

This command will take "testfile" and transfer it to another box with ip_address

cat testfile | ssh -l username ip_address "cat > testfile"

So lets say you have an app called "parse_testfile.pl" on the remote box (ip_address) that you wanna pipe the file to:

cat testfile | ssh -l username ip_address "cat | parse_testfile.pl"

The only downfall to using SSH to do this is the encryption overhead.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0