ExecuteScript evaluating expressions in Bash script

I’m using the ExecuteScript component to execute an inline script, i.e. the Bash script text is in the “Script” field of the component. I’m getting WARNings like:

2016-03-08 18:20:54,767 WARN 589063 [http-8080-19] Cannot evaluate expression: date ‘+%F %T %Z’

from the component trying to evaluate the comment lines in the script. The “Interpreter” field of the component is set to “/bin/bash ${}”. So the component could and IMO should know what a bash comment is and not try to parse into to evaluate anything in the text line.

The form of the comment line in the Bash script is:

# echo “`date ‘+%F %T %Z’` Doing something with files…”

which was a commented out script line. I commented out the line when I got the same WARNings and ERRORs from the line without the comment while trying to get the script to write lines to a log file. I just want the component to handle the script’s return code and not have to process the script’s STDOUT and STDERR in the jobflow.

I see this as a defect in the ExecuteScript component.

Is there any way to suppress parsing and token evaluation within comment lines, at least for the well known interpreters like Linux shells and perhaps Python too?

Hi,

I’m not able to reproduce such behavior. The component doesn’t execute the script itself, instead, it executes the interpreter (bash in your case) and passes the script to it. So the script should behave the very same way as if executed directly in the shell.

In order to resolve your issue provide me with the following, please.

1. Your jobflow/graph with its externalized dependencies (metadata, etc.). Feel free to remove any sensitive information.
2. Your version of the Designer.
3. Your version of the CloverETL Server.
4. Run log where the described error is visible. (whole log file)

Best regards,