Execute a bash script from Matlab
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, thanks in advance for the guidance.....
Running Matlab 2011b on Win 7 machine.
I want to execute a bash script within Matlab. I know from Cygwin, etc I can call it like this: ./ecs_dir.sh folder_1 folder_2
And from a search of the Matlab archives, I found the following guidance on executing bash scripts: "! sh scriptname.sh" (see: http://www.mathworks.com/matlabcentral/newsreader/view_thread/293334)
But when I try this, i am given an error message: 'sh' is not recognized as an internal or external command, operable program or batch file.
How do I properly call this?
Thanks, Matt
0 comentarios
Respuestas (1)
Walter Roberson
el 4 de Jun. de 2012
The information about !sh is only for Unix systems.
Unless you start MATLAB from within Cygwin, etc., your command like would have to look something similar to
!cygwin.exe ecs_dir.sh folder_1 folder_2
I could be wrong on the details, as I have not used cygwin for a number of years.
Windows 7 does not have its own bash.
0 comentarios
Ver también
Categorías
Más información sobre File Operations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!