i have got a bash file which i want to toggle via the sudo crontab list. Problem is, that it does not work, because when i run the script with sudo, there is a syntax error message on this line:
size=(`du -h $backupDir --summarize`)
If i run the same script without, i have to type the sudo pw, but it works without any problems. I allready tried a few variations with brackets, with or without backticks, with or without spaces, etc but nothing helped. The error message is:
Syntax error: "(" unexpected (expecting ";;")
Any help?