Hi Ygor
Thanx.This worked out ! What if i want to put the values of the X and Y together in one file for each Header and I dont' t know how many Header I have in advance ?
E.g. file.HeaderA.log, fil.HeaderB.log, Header....log
Now i want to print the totals for each header to a seperate file with syntax file.$type, e.g. file.X.log and file.Y.log. How can I do this ?
I modified the Code of CaKiwi as follows:
/Header/ {
if (hld) print hld, tot
hld = $0
X = 0
Y = 0
}
/^X/{ X += $2}
/^Y/ {Y += $2}
END {
if...
I made no Skript, but gave in the command as posted.
Input data in Pseudocode form the command df -k in UNIX:
/dev/../dsk/...numberi1 numberj1 numberk1
.
.
./dev/../dsk/..numberin numberjn numberkn
#where all numbers are in kb
Desired Output:
Sum: number in, number jn, nummber kn
Hi,
I want to calculate the total allocated, free and used space for all filesystems which have dsk in their path.
I tried this:
df -k | awk ' /dsk/{
{ for (i=1; i<=NF; i++)
summe[i] += $i/1024/1024
}
sum_zeile = "Summe:"
for (i=2; i<= 4; i++)
sum_zeile = sum_zeile...
ThanX for the postings ! I must refine my question.
With vxprint I have as output different Disk groups, e.g. Disk group: a, Disk group b, etc. and for every disk group the length (in blocks) for their repespective types (disks (dm), volumes, plexes etc.).
So I want an output, which sums up for...
Hi,
I want to build the total for each header.
Output of a command looks like this:
Header: A
Type Length
X 10
X 5
X 15
Y 2
Y 5
Y 1
Header: B
X 4
X 10
Y 3
Y 1
Now, I want to pipe it to awk and calculate the total...
Hi,
How can I get for each disk group (dg)the disk space (in blocks) for the associated disks (dm) with vxprint in o n e command line ? Combination with AWK necessary?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.