bdf display will give format as,
Filesystem kbytes used avail %used Mounted on
so that,
we will be having $1 - %
$2 - FS then,
bdf | awk '!/^Filesystem/ { print $5" "$1 }' | while read per fs; do
if [[ $per -gt 80% && $fs = "/opt/sc" ]]
then
# do something
fi
done
Else simply with awk as,
bdf | awk '!/^Filesystem/ { if ( $5 > 80 && $1 == "/opt/sc")
}'
HTH.
Easy to suggest when don't know about the problem!