I am trying to run a shell script in a flow in Mulesoft's Anypoint Studio.
While I can get some basic shell to run I cannot get my script to run. This is what my script looks like:
#!/bin/ksh
export JWHome=${pwd}
export LOG4J_JAR=$JWHome/lib/log4j-1.2.7.jar
export CLASSPATH=$JWHome/lib/java.jar:$LOG4J_JAR:$JWHome
I set the above script as a payload and execute it from a Groovy script by running:
payload.execute().text
When I run this script I get the following error:
java.io.IOException: Cannot run program "#!/bin/ksh": error=2, No such file or directory
I get the same error when I remove "#!/bin/ksh" - For example when I run Export to set a variable.
How can I get this to run?