Estou tentando executar os seguintes comandos em um arquivo chamado teste.sh
kpm restore
k web
Eles correm muito bem quando eu abrir o cd terminal para a pasta correta e fazer teste.sh sh, mas quando tento executar o seguinte em monodevelop:
using System;
using System.Diagnostics;
namespace terminalcommandteste
{
class MainClass
{
public static void Main (string[] args)
{
StartWebServer ();
}
public static void StartWebServer ()
{
string command = sh;
//string argss = /home/daniel/Downloads/HelloWorldVNext-master/src/hellomvc/teste.sh;
string dir = /home/daniel/Downloads/HelloWorldVNext-master/src/hellomvc/;
string argss = teste.sh;
ProcessStartInfo procInfo = new ProcessStartInfo ();
procInfo.WindowStyle = ProcessWindowStyle.Normal;
procInfo.UseShellExecute = false;
procInfo.FileName = command;
procInfo.Arguments = argss;
procInfo.WorkingDirectory = dir;
Process.Start (procInfo);
}
}
}
A resposta no terminal é:
teste.sh: 1: teste.sh: kpm: not found
teste.sh: 2: teste.sh: k: not found
Press any key to continue...













