Guest User

Untitled

a guest
Jun 18th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. bdf | grep -vE ‘^/path/to/check/’ | awk ‘{ print $5 ” ” $1 }’ | while read output;
  2. do
  3. echo $output
  4. usep=$(echo $output | awk ‘{ print $1}’ | cut -d’%’ -f1 )
  5. partition=$(echo $output | awk ‘{ print $2 }’ )
  6. if [ $usep -ge 90 ]; then
  7. echo “Running out of space ”$partition ($usep%)” on $(hostname) as on $(date)
  8.  
  9. This is system generated e-mail ” |
  10. mailx -s “Alert: Almost out of disk space $usep%” email@server.com
  11. fi
  12. done
  13.  
  14. syntax error at line 7 : `(' unexpected
Add Comment
Please, Sign In to add comment