All pastes #258284 Raw Edit

Unnamed

public text v1 · immutable
#258284 ·published 2006-11-26 10:45 UTC
rendered paste body
for host in localhost
do
    toolarge=`rsh $host 'df -k' |
        awk '
            $5 ~ /%$/ {
                perct = $5;
                sub(/%$/, "", perct)
                if (perct ~ /^[0-9][0-9]*$/ && perct > 85) {
                    print $1, perct
                }
            }
        '`
    if [ -n "$toolarge" ]
    then
        echo >&2 "server $host:"
        echo "$toolarge"
    fi
done