./DriveTempShutdown.sh: -ge: unary operator expected !!!
Posted: May 30th, 2013, 3:37 am
Hello friends
My system is Ubuntu Server 12.04.2 / ISPConfig 3 v.3.0.5.2 / Older Computer P4 2.4GHz, 2Gb RAM
1.
Had this same error when I was editing/running the CPUTempShutdown.sh script...
It's just that "Ian" solved this problem very nicely, it was a GRUB-thing... But now the error is back, I guess it's the same thing, but not quite the same as we corrected the problem allready..
Here's the error message:
Testing Drive sda
./DriveTempShutdown.sh: line 68: [: -ge: unary operator expected
./DriveTempShutdown.sh: line 79: [: -ge: unary operator expected
Here's the full error message:
./DriveTempShutdown.sh 20 60
JOB RUN AT Thu May 30 03:51:19 CEST 2013
=============================================
Drive Warning Limit set to => 20
Drive Shutdown Limit set to => 60
Testing all drives
Drive /dev/sda
Testing Drive sda
./DriveTempShutdown.sh: line 68: [: -ge: unary operator expected
./DriveTempShutdown.sh: line 79: [: -ge: unary operator expected
Temperature of Drive a is OK at =>
All Drives are within limits
2.
# Change the command MyList='a b c d e' to the number of drives you have. In this case I'm using 6 drives
a. If there's 6 drives how come there's only 5 letters? Isn't the first device/hd hda? I'm asking because I'm pretty much a beginner in the Linux Universe...
b. do you have to change it (above) if you use the 3 argument when running the script e.g. "./DriveTempShutdown.sh 30 60 a" ???
3.
# Substitute string "myemail@myaddress.com" with your own email address in the string which starts "/usr/sbin/ssmtp myemail@myaddress.com"
a. I'm told that with the Ubuntu Server 12.04.2 - ISPConfig 3 you'll have to use "sendmail" - any suggestion to how the code could look like? Path & Command?!?
Hope you can help me out, again
Kind Regards,
Dan Hansen / Denmark
My system is Ubuntu Server 12.04.2 / ISPConfig 3 v.3.0.5.2 / Older Computer P4 2.4GHz, 2Gb RAM
1.
Had this same error when I was editing/running the CPUTempShutdown.sh script...
It's just that "Ian" solved this problem very nicely, it was a GRUB-thing... But now the error is back, I guess it's the same thing, but not quite the same as we corrected the problem allready..
Here's the error message:
Testing Drive sda
./DriveTempShutdown.sh: line 68: [: -ge: unary operator expected
./DriveTempShutdown.sh: line 79: [: -ge: unary operator expected
Here's the full error message:
./DriveTempShutdown.sh 20 60
JOB RUN AT Thu May 30 03:51:19 CEST 2013
=============================================
Drive Warning Limit set to => 20
Drive Shutdown Limit set to => 60
Testing all drives
Drive /dev/sda
Testing Drive sda
./DriveTempShutdown.sh: line 68: [: -ge: unary operator expected
./DriveTempShutdown.sh: line 79: [: -ge: unary operator expected
Temperature of Drive a is OK at =>
All Drives are within limits
2.
# Change the command MyList='a b c d e' to the number of drives you have. In this case I'm using 6 drives
a. If there's 6 drives how come there's only 5 letters? Isn't the first device/hd hda? I'm asking because I'm pretty much a beginner in the Linux Universe...
b. do you have to change it (above) if you use the 3 argument when running the script e.g. "./DriveTempShutdown.sh 30 60 a" ???
3.
# Substitute string "myemail@myaddress.com" with your own email address in the string which starts "/usr/sbin/ssmtp myemail@myaddress.com"
a. I'm told that with the Ubuntu Server 12.04.2 - ISPConfig 3 you'll have to use "sendmail" - any suggestion to how the code could look like? Path & Command?!?
Hope you can help me out, again
Kind Regards,
Dan Hansen / Denmark