The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
pipe output to two files NobluesFDT UNIX for Dummies Questions & Answers 2 08-06-2008 05:54 PM
pipe output to script as command line argument IMTheNachoMan UNIX for Dummies Questions & Answers 3 04-26-2008 12:59 PM
Output report ravi gongati Shell Programming and Scripting 1 03-21-2008 09:13 AM
how to pipe output of here-document!! sami98 Shell Programming and Scripting 7 02-17-2008 10:40 AM
output string message to pipe princelinux High Level Programming 3 08-18-2006 02:09 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-04-2009
mirx mirx is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 2
pipe report output to another server

I have access to an AIX 5.3 box, where I need to write a report to:
/tmp/report
The report is larger then the amount of available disk space on the box.
There's about 1 GB of free space, for a 1.5 GB report.

The report is destined for another box (10.0.0.2) anyway, which has enough free space.
This report gets run weekly. Currently we have to split the report into chunks and transfer the parts separately.
What I'm thinking might be an option is to create a named pipe to send the report to the other box using ftp or scp (or curl if I have to but its not currently installed).

What I'm not sure about is how to do this:
Create /tmp/report before I run the report as some type of named pipe that directs to:
|scp user@10.0.0.2:/lots_of_space/report
then have the app write the report to /tmp/report, where the pipe send it to my other box. I'm also not sure if the app writing the report will just try to over write the file/pipe at /tmp/report instead of piping it.

I pretty familiar with unix, but I haven't done much in the lines of named pipes or piping across the network.

Thanks in advance for any help!
  #2 (permalink)  
Old 04-05-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361

Code:
[ -f /tmp/report ] && rm /tmp/report
mkfifo /tmp/report
report_command &
ssh user@10.0.0.2 "cat > report" < /tmp/report
rm /tmp/report
  #3 (permalink)  
Old 04-05-2009
mirx mirx is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 2
Thank you for the code cfajohnson.
I'll give it a try.
Thanks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0