while loop
? Syntax while condition; do…; done
? Case 1
#!/bin/bash
while :
do
load=w|head -1|awk -F’load average: ”{print $2}’|cut -d. -f1
if [$load -gt 10 ]
then
top|mail -s “load is high:
while loop
? Syntax while condition; do…; done
? Case 1
#!/bin/bash
while :
do
load=w|head -1|awk -F’load average: ”{print $2}’|cut -d. -f1
if [$load -gt 10 ]
then
top|mail -s “load is high: