For my following question I tried to find a solution in other forums but didn’t get an answer so I try here because it has at least something to do with root.
From within my root macro I need to run a command on another linux machine. Therefore, I use “plink.exe” on my windows platform (it is part of putty) to exectue the command
Somehow, plink cannot handle arguments especially when they contain quotation marks. The command “plink delos@host ArchiveExport” works without any arguments.
I tried to use (back)/slashes and so on but nothing is accepted.
Does any one of you have a clue what I could do?
Sorry, I forgot to mention but of course I tried from the command prompt in windows first. Also there arguments don’t seem to be handed over.
It’s true, that it is more a windows or plink problem and not a root issue. But maybe someone finds a solution here.
Actually, it works now from the windows command prompt. When I try a system call with system(“plink”) from within root it complains that ArchiveExport cannot be found.
Could you be more explicit? What command did work for you from the command prompt?
How do you translate this command to a ROOT script? Do you add backslashes?
What is the exact error output?
I tried system("plink delos@host /usr/local/bin/ArchiveExport -o tmp.dat -start \\\"12/10/2016 00:00:00\\\" -end \\\"19/10/2016 00:00:00\\\" -gnuplot -precision 9 /gfa/archiver-data/archive_ZHE_MT/index MHC1:IST:2");
but windows complains Der Befehl "ArchiveExport" ist entweder falsch geschrieben oder
konnte nicht gefunden werden. The command is either incorrect or could not be found.
I dont understand why windows regards “ArchiveExport” as a command but not an argument.
works from the root [0] command prompt.
In a macro I again get “the command ArchiveExport cannot be found”.
Weird.
So it is try and error with quotation marks…
Sorry, still doesn’t work. I don’t understand why there is a difference between executing plink from the root [0] command line and executing the same in a macro.
I guess I will create a script with the required information, copy it to the remote host and execute it there.
Thanks to all of you for your persistent help!