#!/bin/sh
#
# $Id: rundf.sh,v 3.9.2.0 1995/06/12 17:14:03 mj Exp $
#
# Check free disk space for runtoss script
#
# Needs GNU fileutils df! (configure PATH if necessary)
#
# Usage: rundf dir ...
#

PATH=<BINDIR>:$PATH

free=`df -P $* 2>/dev/null  | \
      awk '/^\/dev/ || /^[a-zA-Z0-9-]*:\// { print $4; }'`

if [ -z "$free" ]; then
	echo "ERROR"
else
	echo $free
fi
