Echo 192.168.10.69>>ip.list-------------------------------------------#!/bin/bash# Note the spaces between if and []RM-F ~/fanr/shell/diskusagealert/Out.printout=$(Cat~/fanr/shell/diskusagealert/ip.list)Echo$out for_ipinch$out Do SSH[Email protected]$_ipDF|grep-ve"None|devfs"|awk '{if (nr>=2 && int ($) >100) print "'$_ip'" ":d ISK at "$6" usage is "$ large than 90%"}'>> ~/fanr/shell/diskusagealert/Out.print DonePrint=$(Cat~/fanr/shell/diskusagealert/out.print)Echo$printif["$print"!="" ]#if[-S "~/fanr/shell/diskusagealert/out.print"] Then Echo One #Echo$print | Mail-s"Disk Usage Alerter"[email protected]fi--------------------------------------------------------------------------------------crontab Diskusagealert.crontabCatdiskusagealert.crontab# Run once every 5 minutes*/5* * * *SH/root/fanr/shell/diskusagealert/diskusagealter.SH Reference: http://liguxk.blog.51cto.com/129038/123555 Linux automatically executes crontab learning notes