-
Notifications
You must be signed in to change notification settings - Fork 11
/
find-user.additions.csh
59 lines (42 loc) · 1.22 KB
/
find-user.additions.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/csh
### add-it.csh
###
### This script is used in conjuction with find-user.csh
### to compute disk space and percentage usage.
###
### Submitted By: Marc Jacquard
###
foreach i (`cat /tmp/short.list`)
\echo $i": \c"
cat /tmp/$i.list | ./add.awk
end
------ CUT-HERE -----------
ADD.AWK script
------ CUT-HERE -----------
#!/bin/csh
### add.awk
###
### add.awk is called by add-it for computation of numbers.
###
### Submitted By: Marc Jacquard
###
{
FS=" "
size = $1
sum=sum+size
}
END {printf("%u GB[%5.2f %]\n",(sum*512)/(1024*1024*1024),
(((sum*512)/1024)/(176504832)*100))}
##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright 2006 Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.html
##############################################################################