Knarf
Basic Pleskian
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Parallels Plesk Panel v10.1.1, Ubuntu 10.04 x86_64
PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
This command line:
/etc/cron.daily/60sa-update
generates this error:
[: 9: 1: unexpected operator
[: 14: 1: unexpected operator
Also in the daily e-mail I receive this message:
/etc/cron.daily/60sa-update:
[: 9: 1: unexpected operator
[: 14: 1: unexpected operator
run-parts: /etc/cron.daily/60sa-update exited with return code 1
ACTUAL RESULT
/etc/cron.daily/60sa-update returning:
[: 9: 1: unexpected operator
[: 14: 1: unexpected operator
EXPECTED RESULT
/etc/cron.daily/60sa-update returning no errors
ANY ADDITIONAL INFORMATION
Line 9 and 14 refer to the closing "fi" of the "if" statement, but I could not find anything wrong with "fi".
After searching for possible solutions, I changed #!/bin/sh on line 1 to #!/bin/bash and this seems to work: no errors anymore!
I just don't know why #!/bin/sh isn't working as other scripts have #!/bin/sh as well but they don't produce errors.
Parallels Plesk Panel v10.1.1, Ubuntu 10.04 x86_64
PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
This command line:
/etc/cron.daily/60sa-update
generates this error:
[: 9: 1: unexpected operator
[: 14: 1: unexpected operator
Also in the daily e-mail I receive this message:
/etc/cron.daily/60sa-update:
[: 9: 1: unexpected operator
[: 14: 1: unexpected operator
run-parts: /etc/cron.daily/60sa-update exited with return code 1
ACTUAL RESULT
/etc/cron.daily/60sa-update returning:
[: 9: 1: unexpected operator
[: 14: 1: unexpected operator
EXPECTED RESULT
/etc/cron.daily/60sa-update returning no errors
ANY ADDITIONAL INFORMATION
Line 9 and 14 refer to the closing "fi" of the "if" statement, but I could not find anything wrong with "fi".
After searching for possible solutions, I changed #!/bin/sh on line 1 to #!/bin/bash and this seems to work: no errors anymore!
I just don't know why #!/bin/sh isn't working as other scripts have #!/bin/sh as well but they don't produce errors.
Last edited: