Not able to run Linux command using tSystem Component
Hello All,
I am running following command in TOS using tSystem Component. But It is not performing the task rather displaying the contents in the console when its executable is run.
sed 's/_DEV/_PROD/' input_file > output_file
I am passing input_file and output_file from context params.
Please help.
Bonjour Laurent,
Thank you for reply. Yes, It works if I create an .sh file which contains
sed -i '1s/^/'Custome_Header_Name'\n/' CI*.txt
code, but my problem is after I migrate source data from oracle to txt file(split after 1000 records), this target txt folders gets deleted prior to new file creation on daily basis, so in this case my .sh script file will get deleted and to add custom header I need to create it again .sh file in particular folders.
Conclusion: I need to pass header file path(Custome_HEader_Name) and folder name(target folders employee, students etc) path in which I have to add header.Henceforth I used following code:
"/bin/bash tempath='/home/UserName/Desktop/CI0.txt' Filepath='/home/UserName/Desktop/HeaderCi.csv' for line in $temppath; do cat $Filepath $line>tmp && mv tmp $line done"
Please let me know in case you have some other work around.
Thanks Again.
RSH