sinebubble
IS-IT--Management
How to get this to work? I want to execute a command on a field (du -adko $6 | sort -nr | head -10)...
df -k | grep -v cdrom | grep -v : | sed 1d | sed 's#%##' | awk '{ if ( $5 > '$PAGE_NUMBER' ) { print "ALERT: "$6 " is " $5 "% full on "} else if ( $5 > '$MAIL_NUMBER' ) { print "WARNING: "$6 " is " $5 "% full on "; system(du -adko $6 | sort -nr | head -10); } }'