File: dkspuse

package info (click to toggle)
xfce4-genmon-plugin 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 932 kB
  • sloc: ansic: 1,273; sh: 314; makefile: 129; perl: 21
file content (32 lines) | stat: -rwxr-xr-x 632 bytes parent folder | download
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
#!/bin/bash -norc
#$Id: dkspuse,v 1.1 2004/11/01 00:22:48 rogerms Exp $

#Description#
# This script displays the space usage for each of the indicated partitions

if [ $# -eq 0 ]; then
	echo "" 1>&2
	exit 255
fi

Capacity ()
{
	capacity=`df -kP $1 | awk '{print $5;}'`
	capacity=`echo $capacity | awk '{print $2;}' | cut -d '%' -f 1`
	echo "${capacity}%"
} 

for partition in $*; do
	Capacity $partition
done

#$Log: dkspuse,v $
#Revision 1.1  2004/11/01 00:22:48  rogerms
#Initial revision
#
#Revision 1.2  2004/09/10 23:20:10  RogerSeguin
#Slight improvement
#
#Revision 1.1  2004/09/10 11:00:20  RogerSeguin
#Initial revision
#