RE: updating a file in place is almost working

2002-07-01 Thread Rice, Elizabeth A.
Well, I think I figured it out. When I reviewed the examples in Perl Cookbook more closely I realized that the array has to be big enough to hold all the lines that go back into the existing file. If we run our script shortly after midnight, parsing for date, most of the lines will go to the .old

RE: updating a file in place is almost working

2002-07-01 Thread Rice, Elizabeth A.
>any usual logrotate script I've come across would send a SIGHUP to the appropriate process Thanks for you input. I tried manually emulating the logrotate script by moving the log file and then sending the kill -HUP to the processes. Unfortunately only one of several processes writing to the sam

RE: updating a file in place is almost working

2002-07-01 Thread Rice, Elizabeth A.
r processing we wanted to do with the file also. Does the logrotate script send a sighup to the process? Thanks again, Beth Rice > -- > From: Anders Holm[SMTP:[EMAIL PROTECTED]] > Sent: Monday, July 01, 2002 5:19 AM > To: [EMAIL PROTECTED]; Rice, Eliza

Matching question

2002-04-03 Thread Rice, Elizabeth A.
I am trying to find the first occurrance of a date string in several different files in order to re-write all of today's entries back into the existing log file after taking out all the old entries to be archived. (I also realize lots of folks have done this and I'm sure come up with much easier

FW: workaround for unix2dos system command

2001-10-30 Thread Rice, Elizabeth A.
Well, I think I've fixed most of the newbie mistakes thanks to forum help. I also found out that the x'15' is the character under EBCDIC, so had to change my regex. Here's the new code snip.. open (VDOSLOG, ">$VIRUS_DLOG") or die "Error cannot open dos virus log: $!"; while( ) { # s/\x0A/\x

Re: workaround for unix2dos system command

2001-10-25 Thread Rice, Elizabeth A.
>> on OS/390 there is no unix2dos command available. So, if I use the file as >> is, it is sent in the email but it comes out with no carriage returns, etc., >> making the file unreadable when it is of any significant size. >You can use a simple oneliner in Perl to convert text files see >htt

workaround for unix2dos system command

2001-10-24 Thread Rice, Elizabeth A.
I am modifying a perl script that was originally written for a Solaris platform, where the unix2dos system command is available. The script puts text and filenames into a log file, then runs unix2dos command against the log file, then ships it off as part of a sendmail command. on OS/390 there

sys admin tasks

2001-10-01 Thread Rice, Elizabeth A.
I need to write a script on both NT and UNIX to monitor a process and restart if it fails. I know how to do it in UNIX, but am wondering if there are any PERL functions that would work across platforms so I won't have to recreate the entire script for the NT box. I have available to me "PERL Bla

FW: File names on NT

2001-08-29 Thread Rice, Elizabeth A.
he contents of the file. Thanks again. > -- > From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, August 29, 2001 11:13 AM > To: Rice, Elizabeth A. > Subject: Re: File names on NT > > The following message is a courtesy copy of

File names on NT

2001-08-29 Thread Rice, Elizabeth A.
My PERL program uses the File::Find routine to find files that match a certain description, and then build a file that contains a list of these filenames. Later I pass that file with the list of filenames to an archive program, invoked via the system function. The File::Find puts the names in

Sending mail using PERL with file as body of message

2001-08-01 Thread Rice, Elizabeth A.
I've been looking for a tool to send a email to multiple recipients, using a file as input to the body of the message, that will working on multiple operating systems, and is fairly simple since I'm new at this. I've investiaged Mail::Mailer and Net::SMTP, but maybe because I'm a newbie these s