Is it possible to run a .exe file in Ubuntu in a script? For example a simple Matlab code like this:
system("dir/WAV2RAW.exe")
Is it possible to run a .exe file in Ubuntu in a script? For example a simple Matlab code like this:
system("dir/WAV2RAW.exe")
I think you should use Wine.
sudo apt-get install wine
wine dir/WAV2RAW.exe
Or Mono if you know that exe is .NET application:
sudo apt install mono-runtime
mono dir/WAV2RAW.exe
chmod
. Besides that, it's worth noting that not all software runs under wine. YMMV.
Jan 24, 2018 at 10:35
chmod
line according to my comment. However, I think it is only necessary if you want to run the .exe
file directly, i.e. without prepending wine
to the command line – like OP wants to. I haven’t tested it with Wine but it behaves this way with .NET exe files (mono my.exe
or chmod +x my.exe && ./my.exe
) or even shell scripts (sh script.sh
or chmod +x script.sh && ./script.sh
).
sudo apt-get install wine-stable
Jan 6, 2022 at 16:58
As mentioned in the comments this may be an XY problem
You could use 'sox' to convert from raw to wav file types:
sudo apt install sox
will install the program, then
sox --type raw <infile> --type wav <outfile>
would perform a simple conversion from the raw to wav formats