Quantcast
Viewing all articles
Browse latest Browse all 1729

New Post: RunCommand for sub processes (Mongo)?

RunCommand() uses the ssh command feature. Means each command is started in it's own new "shell".

client.RunCommand("pwd")
=> $HOME

client.RunCommand("cd /tmp")
client.RunCommand("pwd")
=> $HOME

client.RunCommand("cd /tmp && pwd")
=> /tmp

I think what you need is a ShellStream.

Hint: Don't just check result, which is just STDOUT, also check the Error-Property.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>