[comp.unix.aux] *here* is ds, a nice df replacement.

time@oxtrap.UUCP (Tim Endres) (03/27/89)

This is a nice replcement for the awfully inadequate
System V implementation of df.

#!/bin/sh
#
# This script filters the miserable output of "df -t"
# through an awk script which amkes it more meaningful.
#
df -t |
awk 'BEGIN {\
		printf "%-20s %-20s %-8s %5s  %-5s\n",\
				"Mount Point", "Device", "FreeBlks", "Megs", "%Free";\
		}\
{\
	if ($1 != "total") {\
		mntpt = $1;\
		device = $2;\
		freeblks = $3;\
		}\
	else {\
		printf "%-20s %-20s %8d %5.1f %5.1f%%\n",\
			mntpt, device, freeblks, freeblks/2000.0, (freeblks/$2)*100.0;\
		}\
	}'