By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,067 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

communication between two scripts

P: 62
Hi!

I have 2 scrpits.How can I make the Script1 standard output be the Script2 standard input,during all run? I have Windows XP.

Thanks!
Sep 29 '08 #1
Share this Question
Share on Google+
5 Replies


Ganon11
Expert 2.5K+
P: 3,652
You would have to use piping. Not sure if this works on a DOS command prompt, but in a Linux shell at least, you would type:

Expand|Select|Wrap|Line Numbers
  1. script1.pl | script2.pl
Sep 29 '08 #2

P: 62
Thanks for your help but it really doesnt work.The first scipt begin run but when I write to pipe the second run again from start end come back whit fail.
To be other way to make it in Windows?

Thanks
Sep 29 '08 #3

KevinADC
Expert 2.5K+
P: 4,059

P: 62
Thanks!

I tried this before:

Expand|Select|Wrap|Line Numbers
  1. open(PIPE,"|perl -w Srcipt.pl"); 
  2.  print PIPE "hello";
  3.  close(PIPE);

But this restart the destination script:I want write to the standard input of the destination script between it work.
Sep 29 '08 #5

KevinADC
Expert 2.5K+
P: 4,059
read the page I linked you to, all of it.
Sep 29 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.