, September 30, 2004 5:32 PM
To: rmck; [EMAIL PROTECTED]
Subject: Re: sum a column
Hello,
Im trying to sum up a column from my results. Help.
current output:
Date_Time, SRCIP, DSTIP, TOTALBYTES
01-01-2004 12:56:48, 192.168.1.1, 192.168.2.2, 2768
Sum Of Bytes = 2768
01-01-2004 12:56:48
To: [EMAIL PROTECTED]
Subject: Re: sum a column
Rmck wrote:
Gunnar Hjalmarsson wrote:
Rmck wrote:
Im not sure how to sum up the column... I tried by using the
field and * it by the increment.
That awkward attempt seems to be made by someone who hasn't a
clue about programming.
I have
PROTECTED]
Sent: Friday, October 01, 2004 2:53 AM
To: [EMAIL PROTECTED]
Subject: Re: sum a column
Rmck wrote:
Are you serious.
Indeed.
Im not sure how to sum up the column... I tried by using the field
and * it by the increment.
That awkward attempt seems to be made by someone who hasn't
Hello,
Im trying to sum up a column from my results. Help.
current output:
Date_Time, SRCIP, DSTIP, TOTALBYTES
01-01-2004 12:56:48, 192.168.1.1, 192.168.2.2, 2768
Sum Of Bytes = 2768
01-01-2004 12:56:48, 192.168.2.2, 192.168.1.1, 438
Sum Of Bytes = 876
01-02-2004 16:49:45, 192.168.3.3,
: Gunnar Hjalmarsson [EMAIL PROTECTED]
Sent: Sep 30, 2004 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: sum a column
Rmck wrote:
Im trying to sum up a column from my results. Help.
job specification snipped
Im stuck.
I don't believe you. To be stuck, you need to try first, and I suspect
that you
Hello,
I have a script that I want to print only if between 08:00 and 17:00. Would I match
every hour then print?? Any cleaner way to do this would be great. Thanks
my($sec,$min,$hour,$mday,$mon);
($sec,$min,$hour,$mday,$mon)=localtime;
$timestamp=sprintf(%3s %02d
Im trying to list a record once and then count how many records. But I keep getting a
list of all the records and it counts those?? I read in a file with a list of rooms
and then look for each one that matches dept 22 and Im trying to show it once and then
count how many for the building?
11BLD:333
For 20 :
1BLD:1544
2BLD:1544
My goal was to have this output:
For 30 :
10BLD:211
1BLD:333
For 20 :
2BLD:1544
Thanks..
-Original Message-
From: Wiggins d Anconia [EMAIL PROTECTED]
Sent: Jun 16, 2004 7:23 AM
To: rmck [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Counting help
Hi
I have the .h file of a program that spits out a data file which is Binary Output. The
binary file is a series of fixed length records. In C, each record has the format
which is in the script.
I thought I could use unpack to read the data, and I am having no success. PLEASE let
me
Hello,
This code below works. But I am wondering if it can be made more efficient:
while (FHOREAD) {
my $sport = (split(/\s/,$_))[8];
my $sdport = (split(/\s/,$_))[10];
next if $sport =~ /\D/;
next if $dport =~ /\D/;
if ($sport =~ /^(20|21|22|25|53|80|109|110|123|137|161|443)$/ || $dport
hi,
I have a while statement that does a next if a match is made against a reg exprerssion
of some numbers.
data file:
Header
10
20
5201
8001
0
80
3802
#!/bin/perl
use strict;
use warnings;
while( ) { #read from stdin one line or record at a
time.
next if
II [EMAIL PROTECTED]
Sent: Apr 22, 2004 6:59 AM
To: rmck [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: next if question
On Apr 22, 2004, at 8:54 AM, rmck wrote:
hi,
I have a while statement that does a next if a match is made against a
reg exprerssion of some numbers.
data file
HI
I have a script that reads stdin from the output of another script and cleans it up
and prints it. The script gets ip's.
I would like to sort it and and eliminate duplicates count the sorted/unique ips then
print???
I thought using the perl sort command would help but it did not... I
IP'S = 2
Not Ip=111.111.13473
Thanks,
Rob
-Original Message-
From: John W. Krahn [EMAIL PROTECTED]
Sent: Mar 18, 2004 10:39 AM
To: [EMAIL PROTECTED]
Subject: Re: sort stdin and print
Rmck wrote:
HI
Hello,
I have a script that reads stdin from the output of another script
Help
I need this variable $time to show last hour (00..23) So if hour is 00, I want 23. If
hour is 01, I want 00, etc.
I can run that awk statement on the command line and it works great, but if I try it
in the script it fails with an awk syntax error...
Is there a way to look at last
Hi
This scripts sucks in a 109mb file and i'm trying to do a search and replace on
unxtime to the format from strftime. Which is working...
But I run this system call and it took allnight to run :(
So I killed it... Any other suggestions to reach my goal.
#!/usr/bin/perl
use strict;
Hi
I have the following script that sucks in a file and converts unix timestamp to human
readable..
The Goal is to do a search and replace of unix time to the format i need. But I'm just
trying to get it to print in the format i need first...
I cant get localtime to print in mm-dd-
Hi,
I'm stuck and that I would ask if anyone has a script to check for empty passwords
/etc/passwd/ /etc/shadow and then lock them Thanks
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi,
I have a script that I what the last part of the element of an array? So I can restart
the script with the same element. Help:
#!/bin/perl
use strict;
# Need IP of current procees so I can re-start it.
# How it is returned:
# root 6762 1355 0 Oct 05 pts/20:00 /bin/perl -w
Hi and Help,
I have a perl script (A) that spawns a unix command and pipes that to a log file. Then
at 23:59 I have a perl script (B) that kills script (A). At midnight script (A) is
kicked off.
My issue is my killing of srcipt (A) is not working. It either is showing under ps,
but not doing
Hello,
I have a perl script that is to stop and start at midnight, and write to a new log
file.
The problem is it runs once then does not run again??
Below is the script that I am tring to use??
bash-2.03#
#!/bin/perl -w
use warnings;
use strict;
my ( $sec, $min, $hour, $day, $mon,
How do you use a shell command in a sprintf. Im trying to add the week of the year to
the end of my file name:
my $logfile = sprintf '/var/sno/weeks/week_'. `date +%W`.'/%02d%02d%02d%02d%02d.sno',
$year % 100, $mon + 1, $day, $hour, $min;
but when it is used I get:
bash-2.03# ./script.pl
Hi
I'm trying to get this to work in perl.
I want to start a unix process send it to a log file. Then at midnight kill it and
restart it, with the date at the top.
I'm starting with the following but the intial start of the proccess is not working
right:
#!/bin/perl
$date = `date | awk
Hello,
I have a perl script that opens up a text file and displays the data fine.
My textfile:
111.111.111.1-25|DEPTA
222.222.222.50-60|DEPTB
What I would like to do is have it increment 1 through 25, and 50 through 60, and
display that like so:
SO FAR ..
here is the data file
24 matches
Mail list logo