From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653647621797.tru64-unix-managers.marc@archive.invalid> From: George Gallen Date: Thu, 10 May 2001 18:39:37 +0000 To: tru64-unix-managers Subject: Summary: T64 command to add #'s... X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653647621797 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------_=_NextPart_001_01C0D980.9508E050" This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0D980.9508E050 Content-Type: text/plain; charset="iso-8859-1" awk was suggested as the easiest way using: cat filename | |awk '{sum=sum+ $1} {count=count+1} END {print "Total Files " count " | Total Blocks " sum}' Unfortunatly, for me, I think there was a non - numeric piece of data in the file, which caused awk to error out. After having a DBMS program sift through it (showed lots of non-numeric data) guess my initial awking was successfull (and the columns varied in the tar report). Thanks George -----Original Message----- From: George Gallen [mailto:ggallen@slackinc.com] Sent: Thursday, May 10, 2001 1:46 PM To: 'tru64-unix-managers@ornl.gov' Subject: T64 command to add #'s... I'm trying to get a quick idea of how much data is being backed up to tape before the tape drive quits and asks for "reel#2". (Since it's on a cron job, it quits). We would prefer not to go to two drives at present, but that's not the question. What I did was awked out from the tar result file, all the "# Blocks" reported so I have a file of just #'s line after line. ie' 1 5 0 12 (except it goes on for a couple thousand #'s) Is there a command in T64 that will add up these #'s? I realize these are rounded numbers, but it will let me know apx how much the drive is backup up on that tape. Thanks George George Gallen Senior Programmer/Analyst Accounting/Data Division ggallen@slackinc.com ph:856.848.1000 Ext 220 SLACK Incorporated - An innovative information, education and management company http://www.slackinc.com ------_=_NextPart_001_01C0D980.9508E050 Content-Type: text/html; charset="iso-8859-1" T64 command to add #'s...
awk was suggested as the easiest way using:
 
cat  filename | |awk '{sum=sum+ $1} {count=count+1} END {print "Total Files " count " | Total Blocks " sum}'
 
Unfortunatly, for me, I think there was a non - numeric piece of data in the file, which caused
awk to error out.
 
After having a DBMS program sift through it (showed lots of non-numeric data) guess my initial awking
was successfull (and the columns varied in the tar report).
 
Thanks
 
George
 
 
-----Original Message-----
From: George Gallen [mailto:ggallen@slackinc.com]
Sent: Thursday, May 10, 2001 1:46 PM
To: 'tru64-unix-managers@ornl.gov'
Subject: T64 command to add #'s...

I'm trying to get a quick idea of how much data is being backed up to tape before
the tape drive quits and asks for "reel#2". (Since it's on a cron job, it quits).

We would prefer not to go to two drives at present, but that's not the question.

What I did was awked out from the tar result file, all the "# Blocks" reported
so I have a file of just #'s line after line.

ie'

1
5
0
12
(except it goes on for a couple thousand #'s)

Is there a command in T64 that will add up these #'s?

I realize these are rounded numbers, but it will let me know apx how much the
drive is backup up on that tape.

Thanks
George

George Gallen
Senior Programmer/Analyst
Accounting/Data Division
ggallen@slackinc.com
ph:856.848.1000 Ext 220

SLACK Incorporated - An innovative information, education and management company
http://www.slackinc.com

------_=_NextPart_001_01C0D980.9508E050--