473,471 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Windows Call Unxi Perl Script, then input data on Windows Console

4 New Member
Hello everybody:
I am having a problem.
On Unix platform, there is a script that need user to input data from console, then when I call Unix perl script from

Windows, these is an issue occurs, when I input data and enter "enter" so fast, the Windows console is freezed, I don't know

why, does anybody know?Thank you very much.

My code like follows:

On Windows:
Expand|Select|Wrap|Line Numbers
  1. $host = "192.168.18.242";
  2. system("rsh " . $host . " -l brcm01 /export/home/Script/WindowsCallUnixKeyDataTest.pl");
  3.  
On Unix:
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. my $input = "";
  4.  
  5. $input = <STDIN>;
  6.  
  7. $input =~ s#\r##i; #filter character "\r"
  8.  
  9. chomp($input);
  10. while($input !~ /\q/i)
  11. {
  12.  
  13.     print "Now you input : $input\n";
  14.  
  15.     $input = <STDIN>;
  16.  
  17.     $input =~ s#\r##i;
  18.  
  19.     chomp($input);
  20. }
  21.  
Oct 18 '07 #1
4 3761
jane007
4 New Member
Any body know?
Please help me.
Thanks.
Oct 19 '07 #2
numberwhun
3,509 Recognized Expert Moderator Specialist
Any body know?
Please help me.
Thanks.
Sorry, but the way you asked your question is really not that clearly worded.

Have you tried the rsh command from your Windows command line to see if you can get in an run the perl script?

If you do that, you will see that the script is waiting for input. The system command does not seem to supply that input, so the window appears to freeze because there is no input being supplied.

Regards,

Jeff
Oct 19 '07 #3
jane007
4 New Member
Sorry, I means I use perl script on Windows, then remote call perl script on Unix which will ask me to input data.
I have tried it's ok of remoting call.
So, I don't know why I enter "enter" so fast, the screen console will be freezed, but when I input data, then enter "enter" slowly, there is no problem.
Could you try my script?
Thank you.
Oct 19 '07 #4
numberwhun
3,509 Recognized Expert Moderator Specialist
Sorry, I means I use perl script on Windows, then remote call perl script on Unix which will ask me to input data.
I have tried it's ok of remoting call.
So, I don't know why I enter "enter" so fast, the screen console will be freezed, but when I input data, then enter "enter" slowly, there is no problem.
Could you try my script?
Thank you.
Regardless of "where" you are executing the script from, it is still being done remotely. The script you seem to be executing is expecting input. Is the rest of your script supplying that input or is this all of it ( just a system function with an rsh command)? If this is all of it, then (as I said), the window appears to be freezing because it needs input.

Regards,

Jeff
Oct 19 '07 #5

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

Similar topics

1
by: sam | last post by:
I have a function writen in Perl that takes a name-value list (array) as argument and returns a name-value list (array). My question is: How to call this function from PHP and get the returned...
4
by: Patrick Useldinger | last post by:
Hi, I am writing a filter, i.e. a program that reads from stdin and writes to stdout. It works ok when run on its own, but does not work when I try to use another program's output. - The...
3
by: lonelyplanet999 | last post by:
Hi, I'm a newbie to perl and is now studying about perl programming, I read some perl programming tutorials online (enter 'Perl tutorial' at google.com) and also find some sample perl scripts...
3
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then...
12
by: Jarod_24 | last post by:
I got a project called "Forms" that hold some forms and stuff in my solution. A argument at startup defines wether to use a From or Console. My plan was to create a myConsole class that would...
0
by: Peter Conrey | last post by:
I have a perl web service (using SOAP::Lite) with a method called "Detail" that returns a strucure (hash reference to be exact). It works fine when consumed by a Perl client, but when I try to...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
5
by: oaktown | last post by:
Running two input forms on the same page, one php and the other (the one I would like to create) to be written in perl. The idea is to accept an input from a perl script, then pass that input to two...
82
by: happyse27 | last post by:
Hi All, I modified the user registration script, but not sure how to make it check for each variable in terms of preventing junk registration and invalid characters? Two codes below : a)...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.