#!/bin/sh
df-H | grep -vE '^Filesystem|tmpfs|cdrom'|
awk '{print $5" "$1}' while read output;
do
echo $output
usep=$(echo $output |awk '{print $1}'| cut -d'%'-f1)
partition=$(echo $output | awk '{print $2}')
if [#usep -ge 80]; then
echo 'running out of space
\"$partition($usep%)\'on $(hostname)as on $(date)"|mail -s"alert:almost out of disk space $ usep% [email protected]);
f1
Done;
while running the script i got below error.
line 6 Unexpected EOF WHILE LOOKING FOR MATCHING '"'
LINE 13 :syntax error : unexpected end of file: