Quote:
Originally Posted by ghostdog74
that's very kludgy. the usage of awk is more than meets the eye
try this
Code:
df -k | awk 'if ( int($5) > 95) {
subject = $1 " More than 95% disk usage "
email = "email@test.com"
cmd = "mailx -s \"" subject "\" " email
cmd | getline #or system(cmd)
close(cmd)
}
'
|
modified the original.....