Hi, I am writing a command: "echo Hello >> /root/test.txt" in a tSystem component of Talend Job in Linux. It simply prints "Hello >> /root/test.txt", and the output is not redirected to "/root/test.txt". The same command when run from Linux redirects output "Hello" to the file test.txt Is there any other way to write such a command? Can somebody help regarding this. Thanks and Regards, Diwakar
The tSystem currently implements the Runtime.Exec(String command), and not Runtime.exec(String[] cmdarray) which would pass a stack of commands. Also, using redirects such as >> or > is fun stuff handled by bash itself. You could try modifying the component to implement the cmdarray or, my preferred method is to use java.io.BuffererReader and BufferedWriter to read and write to an interactive shell session since there are many subtle behaviors that are implmented by the shell itself that will not work through direct system calls as expected.
hi, I am writing a command: mysqldump -h "+context.host+"-u "+context.root+"-p"+context.host+" "+context.database+"> "+context.out_path_name+" in tsystem for linux through talend this command run but not creating dumpfile & not show any error. while The same command when run from Linux mysqldump -h localhost -u root -proot bennet_bi > d:bennet_bi.sql its creat dump file. Regards Ravindra
hi, i want to create job in which we give database name from csv file & job create mysql dump backup for all given dataabse. how can i do it, thanks ravindra