Hey guys,
Trying to figure out why my "not equals" operator doesn't work in this OR statement:
#!/usr/bin/env python3
import sys
readyprompt = input("Are you ready? [y/n]\n>")
ans = readyprompt.lower()
if ans != "y" or ans != "yes":
print("Quitting. Please run " + sys.argv[0] +...
Hey guys,
I'm trying to write a perl socket daemon that will listen on a port and accepts a data connection via a tar piped with netcat for backups. The client will run this command:
tar cvf - tartest | nc 192.168.1.10 9999
my perl code is here:
#!/usr/bin/perl -w
use strict;
use...
Hey all,
I've been reading how to restrict digits to a certain length and I don't see the error.
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
my $rounded=58.333333;
#$rounded =~ /^\d\d\.\d\d$/; # one solution
$rounded =~ /^\d{2}\.\d{2}/; # another solution
print "Rounded...
Hi,
I'm writing a simple check for a jbod device. If all the drives come back with a status sign of "HEALTHY" then I print an "OK" statement. If it doesn't come with that status, then I print "CRITICAL". Very simple. My script prints CRITICAL when the condition is met but it doesn't print...
Hi there,
I'm trying to match a list of items and using sendmail to mail me only those matching strings from a file. This is the code I have so far:
use FileHandle;
my $match;
# Grab the filenames that have been downloaded
open (FILENAME, "<$logfile");
while (my $match=<FILENAME>) {...
Hi there,
I'm trying to setup a php script for users to be able to upload. I got the upload piece working but what's killing me is the directory timestamp. So, the scenario is that when a user uploads a file, the script will place that file on a directory based on the current date. Creating...
Hi guys,
I'm a complete cisco newb and I'm working on cisco switches here at work as part of my learning process. Woohoo! Anyhow, I have a linux server connected to one of the ethernet ports but how do I find out which port it's connected to without physically being there and tracing the...
Hi,
I have a couple computers in a home network (no domain controller present) and I would like to connect via computer management to my other workstations from my main one. I tried doing so and when I try to connect to another computer it will say "access denied" or something of that message...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.