Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 沙普嘘。。如何确定流程是否已完成_C#_Ssh_Sharpssh - Fatal编程技术网

C# 沙普嘘。。如何确定流程是否已完成

C# 沙普嘘。。如何确定流程是否已完成,c#,ssh,sharpssh,C#,Ssh,Sharpssh,我正在使用SHARPSSH SshShell,我能够连接到我的unix设备。。我能够发出命令(尽管在验证结果时遇到问题) 我能够发出TAR命令,我的问题是确定TAR是否完成。。是否有办法使用SHARPSSH检查此问题 任何帮助都将不胜感激。您没有显示代码,因此很难判断问题出在哪里 我建议看看官方的sharpssh样本,特别是这个[1]样本。它似乎正是您想要的:连接、发出命令并等待结果/等待这些命令的终止 如果这没有帮助,请提供更多信息 1:sshell.WriteLine(“exp system

我正在使用SHARPSSH SshShell,我能够连接到我的unix设备。。我能够发出命令(尽管在验证结果时遇到问题)

我能够发出TAR命令,我的问题是确定TAR是否完成。。是否有办法使用SHARPSSH检查此问题


任何帮助都将不胜感激。

您没有显示代码,因此很难判断问题出在哪里

我建议看看官方的sharpssh样本,特别是这个[1]样本。它似乎正是您想要的:连接、发出命令并等待结果/等待这些命令的终止

如果这没有帮助,请提供更多信息

1:

sshell.WriteLine(“exp system/my4v4t4r#file=PGNIGDV_budjo.DMP log=PGNIGDV_budjo.log full=Y STATISTICS=NONE”)-----如何确定“EXP”命令是否已完成----
SshExec exec = new SshExec("host","user");
            exec.Password = "pass";
            //if (input.IdentityFile != null) exec.AddIdentityFile(input.IdentityFile);

            Console.Write("Connecting...");
            exec.Connect();
            Console.WriteLine("OK");
            while (true)
            {
                Console.Write("Enter a command to execute ['Enter' to cancel]: ");
                string command = "ls";
                if (command == "") break;
                string output = exec.RunCommand(command);
                Console.WriteLine(output);
            }
            Console.Write("Disconnecting...");
            exec.Close();
            Console.WriteLine("OK");

    enter code here