Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

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.
Labels (2)
11 Replies
Anonymous
Not applicable

hi all,
try to wrap your sed command in a .sh file to avoid problem with special character & quotes.
hope it help
regards
laurent
Anonymous
Not applicable

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