Thank you for the reply to my topic, not BASH wars, but does this look
correct?
use IO::Socket;
use strict;
use Time::HiRes qw( time alarm sleep );
$server_ip = 'localhost';
$server_port = 43278;
$microseconds = 5_000_000;
while ( ) {
my $message =
GMane Python wrote:
Thank you for the reply to my topic, not BASH wars, but does this look
correct?
use IO::Socket;
use strict;
use Time::HiRes qw( time alarm sleep );
$server_ip = 'localhost';
$server_port = 43278;
$microseconds = 5_000_000;
You need to do
my $server_ip ... etc with use strict;
I'm having a bit of trouble so far. The code below is what I've found on
different web sites as being the functions I believe I need:
use IO::Socket;
use strict;
use Time::HiRes qw( time alarm sleep );
while ( ) {
my $message =
Yes, but I posted a wrong file. This one doesn't work at all. I have
another that seems to work, but doesn't register on my Python heartbeat
server. It's posted as a reply to Dave just above. Sorry about the wrong
file.
-Dave
JupiterHost.Net [EMAIL PROTECTED] wrote in message
news:[EMAIL
It does not compile on Netware, but it's OK on Windows. For Netware, I
copied from my Windows PC the perl/lib and perl/site directories to Netware
because Sockets::IO was not found. Now, I get:
Missing $ on loop variable at sys:\perl\lib/strict.pm li
BEGIN failed--compilation aborted at
On Wed, 29 Dec 2004 12:50:21 -0500, GMane Python
[EMAIL PROTECTED] wrote:
while ( ) {
That isn't doing what you expect, which (I assume) is an infinite
loop. loops over @ARGV and attempts to open each arg as a file and
iterate over the lines in each. I suppose it is functionally a
somewhat
Or more commonly:
while :; do
...
done
because the : command is true.
It works for me. That's the way I'd seen it done when I was
learning bash. I
believe the while checks the return value, not the output of
the command.
Just be thankful
was wondering if there were a translation in PERL so I could have my Netware
servers send heartbeats to the heartbeat server?
Title: PyHeartbeat - detecting inactive computers
Submitter: Nicola Larosa
# Filename: HeartbeatClient.py
Heartbeat client, sends out an
Andrew == Andrew Gaffney [EMAIL PROTECTED] writes:
Andrew It works for me. That's the way I'd seen it done when I was learning
Andrew bash. I believe the while checks the return value, not the output of
Andrew the command.
That's a bash-ism then, not The One True Shell. I was using The One
Hello Everyone.
Whil e reading the Python Cookbook as a means of learning Python, I
came across the script by Nicola Larosa. Not knowing anything about PERL, I
was wondering if there were a translation in PERL so I could have my Netware
servers send heartbeats to the heartbeat server?
GMane Python wrote:
Hello Everyone.
Whil e reading the Python Cookbook as a means of learning Python, I
came across the script by Nicola Larosa. Not knowing anything about PERL, I
was wondering if there were a translation in PERL so I could have my Netware
servers send heartbeats to the
S. David Rose wrote:
Sorry, sir. I did not state it boldly enough, but this is to be used on a
Netware server. There is no port for Python on Netware, but PERL is
available. Obviously, bash scripting will not work
It's Netware 5.0 / 5.1 for my servers.
Ah, sorry. I didn't catch that part.
Andrew == Andrew Gaffney [EMAIL PROTECTED] writes:
Andrew while `/bin/true`;
Uh, what?
Execute /bin/true,
take its output
if its output is non-null, continue.
Last I checked, /bin/true outputs nothing. :)
Maybe you wanted:
while true;
do; ...; done
Or more commonly:
Randal L. Schwartz wrote:
Andrew == Andrew Gaffney [EMAIL PROTECTED] writes:
Andrew while `/bin/true`;
Uh, what?
Execute /bin/true,
take its output
if its output is non-null, continue.
Last I checked, /bin/true outputs nothing. :)
Maybe you wanted:
while true;
do; ...; done
Or
14 matches
Mail list logo