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: -
$host = "192.168.18.242";
-
system("rsh " . $host . " -l brcm01 /export/home/Script/WindowsCallUnixKeyDataTest.pl");
-
On Unix: -
#!/usr/bin/perl
-
-
my $input = "";
-
-
$input = <STDIN>;
-
-
$input =~ s#\r##i; #filter character "\r"
-
-
chomp($input);
-
while($input !~ /\q/i)
-
{
-
-
print "Now you input : $input\n";
-
-
$input = <STDIN>;
-
-
$input =~ s#\r##i;
-
-
chomp($input);
-
}
-
4 3788
Any body know?
Please help me.
Thanks.
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
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.
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 name-value list in
PHP variable?
Thanks.
|
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 producer program (t1):
print "a b c"
print "d e f"
- The filter program (t2):
|
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 for study.
For below statements I couldn't understand what is the function of
'$in'. I tried to search through the perl script tutorial pages since
this morning (now it's afternoon) but still couldn't find the
explanation. Could anyone help...
|
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 should run on a Unix box I have. Both
scripts run ok, except for the part when Windows try's to call out the
Unix script. I have it set up where the Unix is mapped through a drive
letter and can drop stuff into the Unix box. It is going through another...
|
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 also allow my application
to display a Console, but i don't seem to be allowed to do this.
I don't see any References that i need to add, so how do i do this.
| |
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 consume
it with a C# application, I get the following runtime error from C#:
Cannot assign object of type System.Xml.XmlNode to an object of
type ConsoleApplication1.com.hilton.crmdev.SummaryType.
Below is the Perl code that generates the hash,...
|
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 on her local
machine.
Everything looks pretty good. OpenLDAP/cygwin works great. PostgreSQL
works great. Apache runs. PHP runs.
But when I try to connect to my PostgreSQL server using PHPPgAdmin, I
|
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 other input fields, one in perl and the other in php. The two existing input fields (perl and php) are stand alone scripts. The perl script searches a flat text data base, while the php script searches a MySQL data base. The end result desired is to...
|
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) html
b) perl script (print and inserting into database)
Cheers...
Andrew
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |