I am getting that error a lot the past two weeks when putting executeShellCommand lines in agent procedures.
I don't understand why.
In this case, I made a one line procedure:
executeShellCommand echo "blahblahblah" >/tmp/blahblah.txt Execute as System Mac OSX Halt on Fail
and this is the result from the agent log:
FAILED to load the THEN steps for mac-test(ID = 576264732).Error: Invalid script variable syntax or bad command parameter (step 0)
I can type the echo command in KLC remote terminal and it works just fine.
What "Then steps" could it be trying to load, on a one line procedure?
Can anyone help with this?
This same "failed to load then steps" error is happening on new procedures I write for Windows machines as well, for executeShellCommand
I've had a few where it was just two lines; "GetURL" followed by executeShellCommand to run the downloaded file, and they also give the THEN steps error. I've had to add extra steps of creating a batch file to run the downloaded files and execute that batch file from the procedure instead of just executeShellCommand.
I've got dozens of other procedures written with GetURL followed by executeShellCommand that work just fine. The problem has just been recently when trying to create new procedures using the same steps as my older, working procedures.
Good day Eric,
I dont have a MAC to test it on; not event the images i can see on your post. However, i was wondering if the problem may be related to the fact that the ">" it is a reserved character. Please type it twice as ">>" for the interpreter. Give it a try.
Thanks Miguel. That did the trick for this one.