Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to use the sed command in a tSystem component but I got some troubles...
Here is the command I'm using in the component :
"sudo sed -i 1s/^\\xEF\\xBB\\xBF//" + ((String)globalMap.get("tFileList_3_CURRENT_FILEPATH"))
When I print it I got the good result (this is the resutl of a System.out.println():
sudo sed -i 1s/^\xEF\xBB\xBF// myFile.txt
The sed command seem's correct and is working fine when using manually in linux, but when I try to use it in Talend I got this error:
sed: -e expression #1, char 19: unknown option to `s'
At first I was using single quotes like this:
"sudo sed -i '1s/^\\xEF\\xBB\\xBF//'"
but it did not work, I also tried to escape thoses single quotes... same result.
Can somebody tells me how to write correctly this command on the tSystem component ?
Thanks for your help,
Thomas
@thomas letellier , you no need to use single quote escpe only for double quote you need ot use.
Thanks,
Manohar