1: 2: 3:
One 12345 Connected Two 67890 Connected
1: 2: 3: 4: 5: 6:
count = ` some piped commands | wc -l ` if [$count -gt 0] then do something fi
command | awk '$3!~"Connected" {print}' | while read line do echo $line | mailx -s 'Lines other than "Connected" found!' [email protected] done
The above will do "nothing" (not send out mail) if no matching lines are found.
wmp