在C#中使用rsh.exe在UNIX上运行脚本 [英] Using rsh.exe in C# to run script on UNIX
本文介绍了在C#中使用rsh.exe在UNIX上运行脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以通过ASP.NET直接使用rsh.exe.
我的机器上启用了RSH.所以我可以通过命令提示符使用rsh.
它甚至可以在bat文件中使用.
但是id似乎无法通过C#代码工作.
我的理解是,它不用于自动化目的.
请从代码中进一步了解RSH.exe的用法.
Hi,
Is it possible to use rsh.exe directly though ASP.NET.
RSH is enabled on my machine. So I can use rsh through command prompt.
It even works in a bat file.
But id does not seem to work through C# code.
My understanding is that it is not meant for automation purposes.
Please throw more light on usage of RSH.exe from code.
推荐答案
您可以在Mono(至少在许多UNIX类系统)上的UNIX上进行操作:
http://en.wikipedia.org/wiki/Mono_%28software%29 [ ^ ],
http://www.mono-project.com/ [ http://msdn.microsoft.com/en-us/library/system. diagnostics.process.start.aspx [ ^ ].
在许多情况下,如果您的代码与平台兼容,则可以在Windows上进行开发,并在不重新编译的情况下在其他OS上的Mono下运行此代码.如果您准确地进行开发,通常就是这种情况.
—SA
You can do in on UNIX (at least, many UNIX-like systems) under Mono:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/[^].
The method you would need isSystem.Diagnostics.Process.Start
, please see:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx[^].
In many cases, you can develop on Windows and run this code under Mono on a different OS without recompilation, if you code is platform-compatible. If you develop accurately, it''s usually the case.
—SA
这篇关于在C#中使用rsh.exe在UNIX上运行脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文