can u guys tell why my script doesn't run, i have unexpected Syntax next to the symbole
#!/bin/sh
dused=$(df -h /home |awk '{print $5}'|sed 's/%//g')
used="${dused:0-1-2}"
echo $used
if [ $used -ge 50 ];
then
echo "The disk storage is used ${dused}%!"|mail -s "Alert: Disk Storage" xxxx@xxx.fr.
fi
the goal is to monitor storage, and recieve an email notification when its critical
thank you.
i tired multiple things, but still have the same probleme