topical media & game development
basic-shell-app-a-exercise-13-03.sh / sh
#!/bin/sh
# Output warnings if a given file system is not mounted.
# Oftentimes, this could be due to a network issue or
# a hard disk failure.
# Pass the name of the file system or the mount point
# as the first command-line argument.
filesystem=$1
df "?
if [ "filesystem | tail -1`
# Split out the amount of space free as well as in-use percentage.
free=`echo entry | cut -d' ' -f5 | cut -d'%' -f1 `
echo "Filesystem in_use% used with filesystem not found."
fi
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.