Forum Discussion
DominikWittassek
Mar 23, 2022Copper Contributor
Pipe Content of file in dynamic execution of a command
Hi there! This is the challenge: I create a file in a dynamic location, based on former input. The I need to pipe the contents of this file into a commandline which also has dynamic parameters: ...
Mar 23, 2022
Is your XML file formatted like this? https://help.sap.com/viewer/2c1988d620e04368aa4103bf26f17727/2.0.06/en-US/c2b981c320d84676a0bd9b2bd0c2bf2b.html (It's a Linux example, but I guess it's the same because you're installing SAP right? And is your XML UTF-8?
DominikWittassek
Mar 23, 2022Copper Contributor
Its not the format of the xml doesn't matter. Yes, its a SAP solution.
I managed to run it with
cmd /c $installcmd
I managed to run it with
cmd /c $installcmd
- Mar 23, 2022Ok, and $installcmd contains? (If that's the solution, it's good to post it here)
- DominikWittassekMar 23, 2022Copper Contributor
$installcmd="more " +$sourcepath+"\password.xml |" +$sourcepath+"\hdbinst.exe --silent --batch --path="+$global:installpath+" --agent_instance="+$global:agentname+" --service_user="+$global:serviceuserdomain+"\"+$global:serviceuser+" --read_password_from_stdin=xml"
Cmd /c $installcmd
Sorry for the formatting, I post from my mobile
- Mar 23, 2022Doesn't matter, thanks for sharing