How to call .sh file from Talend

Five Stars

How to call .sh file from Talend

Hello All,


I have a requirement to call shell script(.sh file) in my talend job?

I'm using windows operating system and .sh file was placed on my windows desktop, I have to call .sh file in talend and pass the output to target

can any one tell me how can we achieve this requirement?







Re: How to call .sh file from Talend


Here is a tSystem component in talend which calls other system processing commands, already up and running in a larger Job.

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: How to call .sh file from Talend

Hello Sabrina,


Thanks for your response!!


Could you please provide me some in-sights how shall i call .sh script in tsystem component?


For Ex:


#!/bin/bash -e
opDate=$(date "--date=$indate -1 day")
return opDate


Above is the .sh file( which was placed on my windows box and talend is in same machine.

I'm not sure how can i get output from Talend?




Six Stars

Re: How to call .sh file from Talend

If you want to run your sh command from your windows box to linux system then you can use tSSH component.


You can create that sh file in a context variable and put it into the 'command' text area.

if you are planning to run this job on the linux server then you can tSystem component

Cloud Free Trial

Try Talend Cloud free for 30 days.


Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.