Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have trouble getting a syntax to work. I want to run sed, a stream/text editor, from the QlikView script and replace # with " in a text file.
I have tried a few different ways to get QlikView to do this. Like:
Execute c:\...\sed - i "s/#/\"/g" "filename.txt";
Execute cmd.exe /C c:\...\sed - i "s/#/\"/g" "filename.txt";
The peculiar thing is that if I try to replace by anything but " (chr(34)) it works fine and the command c:\...\sed - i "s/#/\"/g" "filename.txt" works perfect when using the command prompt.
Any ideas how to solve this?
FWIW I am currently running QV Version 10.009061.7 64-Bit
//Nils
Hi,
try to put your command in a file ".bat".
Then execute that.
C u,
Stefano
Hi,
try to put your command in a file ".bat".
Then execute that.
C u,
Stefano
Thank you for the response. The .bat solution works perfectly. I did consider it before but didn't ponder over it enough to realize I could pass the filename to the bat-file as a parameter. Much faster and neater solution than the one I did implement.
//Nils
The new implementation looks like this:
qv script:
execute xxx.bat $(filename);
bat-file:
sed -i "s/#/\"/g" %1