Summary: T64 command to add #'s...

From: George Gallen <ggallen_at_slackinc.com>
Date: Thu, 10 May 2001 14:39:37 -0400

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_at_slackinc.com]
Sent: Thursday, May 10, 2001 1:46 PM
To: 'tru64-unix-managers_at_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_at_slackinc.com
ph:856.848.1000 Ext 220

SLACK Incorporated - An innovative information, education and management
company
http://www.slackinc.com <http://www.slackinc.com>
Received on Thu May 10 2001 - 18:40:48 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT