Hallo,
Ik probeer een script te draaien op mijn DM800HD dat automatisch een mailtje zo moeten sturen als mijn harde schijf 90% vol is maar krijg volgende melding:
root@sardonis:/etc# diskAlert2.sh: line 10: syntax error: unexpected "done" (expecting "then")
1. #!/bin/sh
2. df -H | grep -vE '^Filesystem|tmpfs|cdrom|none|root' | awk '{ print $5 " " $1 }' | while read output;
3. do
4. echo $output
5. usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
6. partition=$(echo $output | awk '{ print $2 }' )
7. if [ $usep -ge 90 ]; then
8. send-mail -s "WARNING! Disk space of DM800 has reached $usep%!" -f censored@gmail.com -b /etc/mail.txt -S relay.dommel.be -P 25 censored@gmail.com
9. fi
10. done
Ik zie niet direct waar ik iets verkeerd doe?
1 reply to this topic
Re: Probleem met uitvoeren script #2
Posted 7 February 2011 - 19:06
2. df -H | grep -vE '^Filesystem|tmpfs|cdrom|none|root' | awk '{ print $5 " " $1 }' | while read output;
haal hier de ';' aan het einde van de regel eens weg...
* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.
Also tagged with one or more of these keywords: Enigma2
m3u/xml?Started by MatthijsNL, 18 Dec 2020 ENIGMA2 |
|
|||
Looking for a good explanation of calculate, calibrate and allocate in positioner setup menuStarted by jeandubois, 19 Nov 2019 enigma2 |
|
|||
Bestand beschermen tegen overschrijven bij software updateStarted by mimisiku, 23 Feb 2019 Enigma2 |
|
|||
plugin extensions epgimport rytec not visibleStarted by arkovda, 19 Aug 2018 enigma2, plugin extension and 2 more... |
|
|||
How to create a new Enigma2 flavor?Started by bihsound, 31 Jul 2018 Enigma2, development |
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users