zombi 0 Posted December 24, 2020 · Report post Символ ">" перенаправляет вывод с экрана в файл. А можно ли как-то сделать чтобы вывод был и на экран и в файл одновременно? Quote Ответить с цитированием Share this post Link to post Share on other sites
andrew_b 0 Posted December 24, 2020 · Report post Был бы Линукс, была бы утилита tee. Quote Ответить с цитированием Share this post Link to post Share on other sites
zombi 0 Posted December 24, 2020 · Report post Windows Quote Ответить с цитированием Share this post Link to post Share on other sites
Сергей Борщ 0 Posted December 24, 2020 · Report post найти tee в msys или во что он сейчас вылился. Или написать самому. Quote Ответить с цитированием Share this post Link to post Share on other sites
ae_ 0 Posted December 24, 2020 · Report post STACK OVERFLOW: Displaying Windows command prompt output and redirecting it to a file Quote Ответить с цитированием Share this post Link to post Share on other sites
jenya7 0 Posted December 27, 2020 · Report post On 12/24/2020 at 1:24 PM, zombi said: Windows как вариант напишите утилитку в .Net private string RunProcess(string proc_name, string proc_args) { /* Create a new process object*/ Process proc = new Process(); /* StartInfo contains the startup information of the new process */ proc.StartInfo.FileName = proc_name; proc.StartInfo.Arguments = proc_args; /* These two optional flags ensure that no DOS window appears */ proc.StartInfo.UseShellExecute = false; proc.StartInfo.CreateNoWindow = true; /* This ensures that you get the output from the DOS application */ proc.StartInfo.RedirectStandardOutput = true; try { // Start the process proc.Start(); // Wait that the process exits proc.WaitForExit(process_wait_delay); // Now read the output of the DOS application return proc.StandardOutput.ReadToEnd().ToString(); } catch (Exception ex) { return "Error: " + ex.Message; //ex.ToString(); } } Quote Ответить с цитированием Share this post Link to post Share on other sites