Skip to main content
Solved

Execution Error for erase-install.sh

  • December 3, 2021
  • 1 reply
  • 14 views

Fluffy
Forum|alt.badge.img+10

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

 

Best answer by Fluffy

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.

1 reply

Fluffy
Forum|alt.badge.img+10
  • Author
  • Honored Contributor
  • Answer
  • December 3, 2021

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.