Posted on 12-03-2021 11:17 AM
I have erase-install.sh (version 25.0) deployed to a computer for testing and get an execution error when running a script with commands.
The script with commands:
sh /Library/Management/erase-install/erase-install.sh --version=11.5.2 --check-power --erase --depnotify
The result:
execution error: /Library/Management/erase-install/erase-install.sh: line 1578: syntax error near unexpected token `>' /Library/Management/erase-install/erase-install.sh: line 1578: `exec > >(tee "${LOG_FILE}") 2>&1' (2)
I am quite green when it comes to scripting languages, so this is over my head other than my understanding there may be a bad syntax somewhere. Can anyone give me some guidance on if I need to edit the script or if I need to adjust a setting somewhere?
For context, these are the couple of lines above the line with the error:
# all output from now on is written also to a log file
LOG_FILE="$workdir/erase-install.log"
exec > >(tee "${LOG_FILE}") 2>&1
Solved! Go to Solution.
Posted on 12-03-2021 11:27 AM
May have found the culprit. Removed sh from the beginning of the script with commands and I am now getting DEPNotify prompts. Will observe if it runs all the way through correctly.
Posted on 12-03-2021 11:27 AM
May have found the culprit. Removed sh from the beginning of the script with commands and I am now getting DEPNotify prompts. Will observe if it runs all the way through correctly.