Execute multiple shell commands from a single command task in Informatica BDM

How to run multiple shell commands from a single command task in Informatica BDM. Just separate the commands with a semi colon, The integration service will execute the commands in the given order.

One thing to note here, If you run multiple commands like this, the script output will be from the last shell commands executed by the command task.

The below workflow is using a command task to archive the inbound file. You can see two shell commands in the command task. The first one will copy the file from inbound location to Archive folder and then the 2nd command will remove the source file from inbound location.

Command task with multiple shell commands

You can configure the workflow variables to get the command task execution status and also the output from the shell command. As I mentioned above the command task output variables will only have the execution status from the last shell command.

How to get the script output from informatica BDM command task!
Assign workflow variables here to get the output from shell script

Have any questions? or need help with this topic, please do reach out to me at kvtinformatica@gmail.com. Don’t forget to follow my Youtube channel and FB page, Lets stay connected and learn together.