Run Something.sh file from matlab
Afficher commentaires plus anciens
I want to run .sh file from the matlab . I have tried following way but its giving the permission denied error.
system('/home/scripts/Something.sh')
/bin/bash: /home/scripts/Something.sh: Permission denied
1 commentaire
Jan
le 2 Mai 2016
And can you run it from the shell directly? Who is he owner and is the executable flag activated?
Réponses (3)
Walter Roberson
le 2 Mai 2016
system('sh /home/scripts/Something.sh')
2 commentaires
Naveen Jacob
le 5 Mai 2020
Thanks it worked !!
Ashita Ashok
le 23 Juin 2020
https://stackoverflow.com/questions/20615217/bash-bad-substitution Why this does not work.
DanielFromIllinois
le 14 Mar 2022
1 vote
If you're running this from Windows (not mac or linux) I got this to work by doing:
system('C:\Apps\Git\git-bash.exe Something.sh')
The above assumes that Something.sh is in your current directory within MATLAB. You could provide an absolute path like:
system('C:\Apps\Git\git-bash.exe C:\Users\UserName\home\scripts\Something.sh')
Dario
le 19 Juil 2024
0 votes
Hello everyone,
do someone know if there is a way to do the same but in simulink? because created a matlab function block calling the sysrem function but it does not work, i tried to 'coder.extrinsic' the fuction but it seems that it does not work either.
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!