Hi Jeremy,

... abstract from top !

Mem:  127776K av, 126272K used,   1504K free,  20424K shrd,    560K buff
Swap: 128484K av, 123084K used,   5400K free                  3744K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
21728 andy      10   0  215M 106M   588 R       0 70.5 85.3   1:50 logconv.pl
24540 root      20   5   684  684   680 R N     0  4.8  0.5   0:00 mkbb.c

andy@funnel:~/suitespot$ ./logconv.pl access
Out of memory!

.... it's still doing something!

andy@funnel:~/suitespot$ ls -l
total 485731
-rw-rw-r--   1 andy     staff    177921787 Apr 30 23:55 access
-rw-r--r--   1 andy     staff    312940544 Apr 19 20:34 access.19Apr-08PM
-rw-r--r--   1 andy     staff           0 May  1 10:38 access.acc


Thanks for the script! I hope it works out ... the log is only 177 megs,
and perl doesn't seem to like it ... not enough memory

Maybe I have to split the log file up into smaller parts or something!

What do you think?



- Andrew








At 09:42 AM 4/30/99 -0700, you wrote:
>
>Andrew Chung wrote:
>
>> Thanks Stephen,
>>
>> I wonder what the EOF syntax is for a normal shell script
>> in bourne shell or csh?
>>
>> Does anybody know?
>>
>
>>From UNIX in a Nutshell: "Read" ... "The return status is 0 unless EOF is
>reached". This seems to only work on stdin, but your can pipe/redirect
from the
>command line.
>
>
>Or, in Perl use the following script. Give it your filenames as a command
>argument and it will put the fixed files in a subdirectory called "fixed". I 
>hope
>I got all the logic on this right - it seams to work on your test lines.
>
>Jeremy Wadsack
>OutQuest Magazine
>a Wadsack-Allen publication
>
>
>#!usr/bin/perl
>
># Munge each file
>foreach $filename (@ARGV ) {
> mkdir( "fixed", umask );
> $outFilename = "fixed/$filename";
>
> # -- Open input and output files
> open( INPUT, $filename );
> open( OUTPUT, ">$outFilename" );
>
> # -- Find and update each bad time stamp
> foreach $contents (<INPUT>) {
>  $contents =~ s/(\d\d\d\d\:)(\d\d)(\:\d)/$1 . $2%24 . $3/e;
>  print OUTPUT $contents;
> } # end foreach
>
> # -- Close input and output files
> close( OUTPUT );
> close( INPUT );
>
>} # end foreach
>
>
>--------------------------------------------------------------------
>This is the analog-help mailing list. To unsubscribe from this
>mailing list, send mail to [EMAIL PROTECTED]
>with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
>--------------------------------------------------------------------

--------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
--------------------------------------------------------------------

Reply via email to