Search Unity

Executing bash file from C#

Discussion in 'Scripting' started by User340, May 12, 2022.

  1. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    How can you run a bash file from C#? When I call Process.Start and pass the path of the file as an argument it doesn't seem to do anything.
    Screen Shot 2022-05-11 at 4.09.34 PM.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,695
    I think that's what you want... but check the working directory first (eg, echo it to a file in the bash script)... I seem to recall being surprised where the subprocess was launched from.