Merging Hashes

2004-02-26 Thread Akens, Anthony
Hi, I'm new to hashes, and I've been playing around with the following for a while... I'm just not getting it. I have two hashes, one containing data read in from a file, one with current data. I'd like to merge the two, adding any new keys and values into the hash, and for any keys that

Use of System

2004-01-20 Thread Akens, Anthony
I'm attempting to use the following code on an AIX machine to monitor the error log (using the errpt command). I'm sure parts of it are very ugly, but it's (mostly) working. The part that isn't is the foreach loop. What it's supposed to do is as follows: #read in the summary error report,

RE: Use of System

2004-01-20 Thread Akens, Anthony
Sorry all, I seem to be having problems with our company's chosen mail client (Outlook). Trying this again, hopefuly it will preserve my EOL characters this time. - Tony I'm attempting to use the following code on an AIX machine to monitor the error log (using the errpt command). I'm sure

RE: Use of System

2004-01-20 Thread Akens, Anthony
Someone kindly pointed out that perldoc is a handy thing. - Tony -Original Message- From: Akens, Anthony Sent: Tuesday, January 20, 2004 4:31 PM To: [EMAIL PROTECTED] Subject: RE: Use of System Sorry all, I seem to be having problems with our company's chosen mail client (Outlook

RE: Microsoft Services for UNIX/LINUX

2004-01-06 Thread Akens, Anthony
Glad you've found a solution. Just thought I'd drop a note about some of the things I've had success with. We have a few scripts (originally written as shell scripts in csh) that I've converted to perl. They reside on a box running AIX 5.1. On a win2k box I've installed the Windows services

RE: Timing several processes

2003-12-04 Thread Akens, Anthony
, 2003 7:24 PM To: Perl Perl Subject: Re: Timing several processes On Dec 3, 2003, at 10:49 AM, Akens, Anthony wrote: [..] print Running vmstat\n; defined(my $vmstat_pid = fork) or die Cannot fork: $!; unless ($vmstat_pid) { exec vmstat 5 5 /log/monitor/delta/vmstat.out; die cannot exec

Timing several processes

2003-12-03 Thread Akens, Anthony
Hi all! I'm wanting to write a simple web-based tool to see the status of several servers at a glance. I know there are many solutions existing, but I can't learn as much about perl by just using one of those as I can by writing my own. The first step I want to do is call a script from cron

RE: Timing several processes

2003-12-03 Thread Akens, Anthony
be a good job for POE? -Tom Kinzer -Original Message- From: Akens, Anthony [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:49 AM To: [EMAIL PROTECTED] Subject: Timing several processes Hi all! I'm wanting to write a simple web-based tool to see the status of several servers

RE: Timing several processes

2003-12-03 Thread Akens, Anthony
). -Tony -Original Message- From: Akens, Anthony Sent: Wednesday, December 03, 2003 12:58 PM To: Tom Kinzer; [EMAIL PROTECTED] Subject: RE: Timing several processes I already have some ideas for how I want to build the page, how to parse the data I will generate, etc. As I said, I've

RE: Timing several processes

2003-12-03 Thread Akens, Anthony
, 0); print done!\n; -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 1:31 PM To: Akens, Anthony; Tom Kinzer; [EMAIL PROTECTED] Subject: RE: Timing several processes I was going to suggest POE as well, 'til I saw that little word

RE: Timing several processes

2003-12-03 Thread Akens, Anthony
not showing up, when I had done my testing I had left out the /n - which caused it not to print until later. Once I added the /n (as you see in the code below) it printed when I expected it to. Thanks for the help... -Tony -Original Message- From: Akens, Anthony Sent: Wednesday, December

RE: OFF TOPIC: Unix in a Nutshell Orielly 3rd edition

2003-11-28 Thread Akens, Anthony
Sorry to hear you're running SCO. My sincerest sympathies. As for Unix books, the O'Reilly Unix in a Nutshell is a good book. I don't consider it quite as indispensible as Essential System Administration, but that book assumes you're a little more fluent in Unix. So if you're a user on the

RE: OFF TOPIC: Unix in a Nutshell Orielly 3rd edition

2003-11-28 Thread Akens, Anthony
awk, 2nd Edition Unix in a Nutshell, 3rd Edition -Original Message- From: Akens, Anthony Sent: Friday, November 28, 2003 2:43 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: OFF TOPIC: Unix in a Nutshell Orielly 3rd edition Sorry to hear you're running SCO. My sincerest

RE: Perl Vs ...

2003-09-22 Thread Akens, Anthony
I first learned C, then C++, which was a good route for me. It gave me a solid background in programming and structure that lends itself well to learning other languages. I've begun to pick up perl in order to aid in system administration, though I've been told that Python is a great tool for

RE: TK

2003-09-19 Thread Akens, Anthony
I think that TK is included in AS perl for windows. I copied Paul privately with a sample Perl TK script to try, so he'll know if he has it. (I was surprised to find that I did!) Didn't want to copy it on to the list, it's a bit large (20k) to flood the list with. (It's the game Same Game done

RE: Matching quoted text question...

2003-09-08 Thread Akens, Anthony
Hello all... I'm wanting to write a script that scans a file, ignoring all lines until it reaches a certain section, then processes all lines in that section that are not comments, until it reaches the end of that section. The section would be designated like this: ## Beging Processing ## ##

Matching a section of test

2003-09-08 Thread Akens, Anthony
Sorry for the first post, didn't mean this as a reply. Hello all... I'm wanting to write a script that scans a file, ignoring all lines until it reaches a certain section, then processes all lines in that section that are not comments, until it reaches the end of that section. The section

RE: Matching a section of test

2003-09-08 Thread Akens, Anthony
Thanks Bob, I'm going to file this away in my nifty perl code file. -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2003 10:29 AM To: Akens, Anthony; [EMAIL PROTECTED] Subject: RE: Matching a section of test Akens, Anthony wrote: Sorry

RE: Getting rid of white space...

2003-09-04 Thread Akens, Anthony
I figured I'd take a stab at fleshing this out into what he wants... Any comments on things I could do better? I only added to what Robert had coded... Tony #!/usr/bin/perl -w use strict; my $dirname = /my/stuff/; my $file; my $newfile; my $line; opendir (DIR, $dirname) or die Can't

RE: Getting rid of white space...

2003-09-04 Thread Akens, Anthony
I figured I'd take a stab at fleshing this out into what he wants... Any comments on things I could do better? I only added to what Robert had coded... Tony #!/usr/bin/perl -w use strict; my $dirname = /my/stuff/; my $file; my $newfile; my $line; opendir (DIR, $dirname) or die Can't

RE: Getting rid of white space...

2003-09-04 Thread Akens, Anthony
NEWFILE; } -Original Message- From: Marshall, Stephen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 11:11 AM To: Marshall, Stephen; Akens, Anthony; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: RE: Getting rid of white space... Got it working

RE: Thanks and another quick Q, how to unconcatenate...

2003-09-04 Thread Akens, Anthony
Something like this will skip all files with _nice at the end... next if $file =~ /_nice$/; unlink ($file) or die Couldn't delete file; (I think that would work. Untested) Tony -Original Message- From: LoneWolf [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 2:23

RE: Upload local file to server

2003-08-29 Thread Akens, Anthony
FTP, NFS, Windows Shares, rcp, scp It's a pretty open-ended question, depends on what OS the server is running, what services, etc. Tony -Original Message- From: Whippo, Ryan K [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2003 11:13 AM To: [EMAIL PROTECTED] Subject: Upload

Graphing/Plotting over time

2003-08-27 Thread Akens, Anthony
Hello all, Just wanted to look into a for fun project, after a recent project that wasn't much fun at all... Our organization got hit by the blaster worm, which hit many, many windows boxes. The *nix boxes (which I manage) were of course unaffected, except by the total lack of bandwidth

File move

2003-07-02 Thread Akens, Anthony
Just want to check and make sure this snippet of code will do what I think it will. Trying to copy all files from $reportsdir to $oldreportsdir my $reportsdir = '/usr2/reports'; my $oldreportsdir = '/usr2/oldreports'; # Move everything from the report directory to the old report directory

RE: File move

2003-07-02 Thread Akens, Anthony
Actually Rob your tips are very handy... I have a nasty habit of posting only part of the code when asking questions here, gotta break that habit. use strict; # always use warnings; # usually Doing those :) - What's this 'move' thing? Have you sneakily added 'use File::Copy without

Formatted info in a web page

2003-07-01 Thread Akens, Anthony
Hi all, I'm trying to display some (hopefuly) nicely formatted information in a web page. The data is pulled from a comma seperated text file. Preferably the data would be scrollable (don't want the page itself to go on and on, so need it displayed in a table or form) searchable, and ideally

RE: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Akens, Anthony
Is the drive you're trying to access actually mapped for the user you're running the cgi-bin as? Remember, in windows drive mappings are a per-user thing, so while yes it will work when you run it at a command line it's because you're logged in and have the drive mapped. When you're running it

RE: Strange behaviour of chdir in mapped drives

2003-06-30 Thread Akens, Anthony
PROTECTED] Sent: Monday, June 30, 2003 9:47 AM To: 'Tim Johnson'; Akens, Anthony; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Strange behaviour of chdir in mapped drives On the last point, does this happen even when using the Task Scheduler utility and running the script as a specified

Binary Replace

2003-06-06 Thread Akens, Anthony
Hi all, I'm doing a text replace in a binary file, which works fine as long as the text I replace it with is the exact same length. If the text I put in is longer or shorter, the program that reads the file (not one I wrote) chokes and spews out a bunch of garbage. Is there a way in perl to deal

RE: Binary Replace

2003-06-06 Thread Akens, Anthony
Anthony Akens wrote: Hi all, I'm doing a text replace in a binary file, which works fine as long as the text I replace it with is the exact same length. If the text I put in is longer or shorter, the program that reads the file (not one I wrote) chokes and spews out a bunch of garbage. Is

RE: How do I check disk space through Perl?

2003-05-29 Thread Akens, Anthony
I've found using Win32::AdminMisc pretty handy, specifically the GetDriveSpace($drive) funtion. Look here: http://www.roth.net/perl/adminmisc/ -Tony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 12:05 PM To: [EMAIL PROTECTED] Subject:

RE: Substring and Sort

2002-10-21 Thread Akens, Anthony
; } } - -Original Message- From: Larry Coffin [mailto:lc2002;PointInfinity.com] Sent: Monday, October 21, 2002 2:53 PM To: Akens, Anthony; [EMAIL PROTECTED] Subject: Re: Substring and Sort At 3:03 PM -0400 10/21/02, Akens, Anthony wrote: I'm attempting to use the following code to read a file

Reset Passwords

2002-10-13 Thread Akens, Anthony
I need something that will allow people who do not know the root password to reset passwords on a DG/UX system (that is using shadow passwords). Basically what I'm wanting to do is write something that will be used as a specific user, so when you log on as that user it asks what account you

RE: Is there a way to do cron on windows?

2002-08-20 Thread Akens, Anthony
Microsoft also has a product called Unix tools for Windows which has cron built into it. I run it on a few machines, and it works fairly well. (has an nfs client/server, telnet server, and a few other nice items in it). Cygwin is also a good option. -Original Message- From: [EMAIL

RE: :Telnet question

2002-08-12 Thread Akens, Anthony
Have you tried using $ion-login($username, $passwd); Instead of doing it the hard way? Here's a sample script I use with net::telnet that works just fine... Might want to try modifying it. I use a hosts file, because my script hits a number of machines. The only bit that might be confusing

Standalone Perl App

2002-07-26 Thread Akens, Anthony
I wrote the following quick'n'dirty script that converts a plain text file (with a little custom markup) into a very basic html file. It works great, and now I'd like to make it into a standalone app to use on my other machines that do not have activestate perl installed (or pass to friends

RE: threads in perl

2002-07-24 Thread Akens, Anthony
perldoc thread This turned up a library on how to thread processes in perl. Seemed fairly straightforward. (though it did say it was experimental, so there may be a better module out there?) -Tony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday,

RE: PM installation problem

2002-07-24 Thread Akens, Anthony
If you're using activestate perl on your windows box, just use ppm. Just type ppm to enter the package manager, then install package:name and it does the work for you. -Tony -Original Message- From: Connie Chan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 11:04 AM To:

RE: Newbie Stupid Question!

2002-07-15 Thread Akens, Anthony
Some comments from a fellow newbie... (and my first stab at being helpful) File::Copy is a great module, and can handle what you're trying to do. as others have already said) On an unrelated note, something that is an immense help to me when using or die is to put $! in the die statement, for

Pattern Matching

2002-06-25 Thread Akens, Anthony
I'm trying to find a way to match anything between two brackets [] The stuff in between will have alpha, numeric, and symbols (including / - @ and spaces) For instance [akens@egh-org blah/blah/blah] I need to match that entire string, including the []'s Here's the ugly thing I've

RE: Pattern Matching

2002-06-25 Thread Akens, Anthony
This will work... /\[.*?\]/ Does exactly what I needed Probably more explaination than you wanted, but I felt like sharing :) Explanations help me learn - maybe someday I'll be able to do these on my own :) Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: Killing Idle Users

2002-06-13 Thread Akens, Anthony
This solution seems to kill anything, here's a snippet of the log. As you can see, it's hitting things low idle times. (I of course commented out the kill line) mmorgan killing process idPID 80350 on pts/0 because minutes equal 1 CLanko killing process idPID 109034 on pts/1 because

RE: Killing Idle Users

2002-06-12 Thread Akens, Anthony
can't you just put export TMOUT=3600 readonly TMOUT in /etc/profile ? If it doesn't work, contact the vendor (IBM for AIX) for a patch. --- Akens, Anthony [EMAIL PROTECTED] wrote: Hello, I'm a sys-admin on an AIX (4.3) machine, and I'm trying to work with a vendor program

Killing Idle Users

2002-06-11 Thread Akens, Anthony
Hello, I'm a sys-admin on an AIX (4.3) machine, and I'm trying to work with a vendor program that doesn't behave very nicely. Basically, if a user's connection to the server is inappropriately severed the application keeps right on chugging, leaving the user logged in. By inappropriately

RE: Killing Idle Users

2002-06-11 Thread Akens, Anthony
:15 PM To: Akens, Anthony; [EMAIL PROTECTED] Subject: RE: Killing Idle Users I am not in a position to offer advice but would love to see it . -Original Message- From: Akens, Anthony [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 10:48 AM To: [EMAIL PROTECTED] Subject: Killing

RE: Killing Idle Users

2002-06-11 Thread Akens, Anthony
PROTECTED] -Original Message- From: Craig Moynes/Markham/IBM [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 1:00 PM To: Akens, Anthony Cc: [EMAIL PROTECTED] Subject: RE: Killing Idle Users Something like this perhaps ?: #!/usr/bin/perl -w use strict; my $USER_IDLE = 40; my @input

RE: Killing Idle Users

2002-06-11 Thread Akens, Anthony
[EMAIL PROTECTED] -Original Message- From: Akens, Anthony Sent: Tuesday, June 11, 2002 1:49 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Killing Idle Users Thanks! The only thing I saw to change was the line if ( $idle =~ /^\d+$/ $idle 0 ) to if ( $idle =~ /^\d

Outlook Contacts

2001-12-11 Thread Akens, Anthony
Is there a Module available that will let me read in a contacts list from an outlook .pst file, or off of an exchange server, make changes to it, and write it back? The area code in my state is changing, and it would be nice to be able to script this using a regex. Thanks in advance for any

New to Perl

2001-07-05 Thread Akens, Anthony
Hello, I'm completely new to perl, but have a good deal of experience with c / c++. I'm wondering if there are any good websites that will give me a basic introduction to programming in perl (data structures, etc). I've found references to a few books, but would like to gather some basic info