I am trying to grab output from awk utility in a script and email the output but script is failing. On HP 11 platform, I trying to get the fifth field from "bdf /var" output and send myself an email if /var is 90% or more full but I have not been able to get it right. Here is what I wrote:
#!/bin/sh
bdf /var |awk '{print $5}'|sed s/%// | awk '{if ($1 >= 90) mail "MyId@email.com"}'
exit
And bdf output is like this:
Server> bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol7 4194304 1756256 2422400 42% /var