Run Something.sh file from matlab
44 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Jan
2016 年 5 月 2 日
And can you run it from the shell directly? Who is he owner and is the executable flag activated?
回答 (3 件)
Walter Roberson
2016 年 5 月 2 日
system('sh /home/scripts/Something.sh')
2 件のコメント
Ashita Ashok
2020 年 6 月 23 日
https://stackoverflow.com/questions/20615217/bash-bad-substitution Why this does not work.
DanielFromIllinois
2022 年 3 月 14 日
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')
0 件のコメント
Dario
2024 年 7 月 19 日
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Install Products についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!