Quote:
Originally Posted by ghostdog74
thanks, its good practice to close that. However, the "if" part, i don't think its needed. but if you could enlighten why its needed, it would be great.
|
oooops, my bad - I didn't see clearly what you're doing - sorry 'bout that:
Code:
df -k | awk '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)
}
'
for the OP benefit.... if you're under Solaris - use 'nawk' instead of 'awk'.
And once again - sorry for the confusion!