How can I run unix commands on a remote server using matlab system

6 ビュー (過去 30 日間)
Eashan Das
Eashan Das 2022 年 5 月 28 日
コメント済み: Walter Roberson 2022 年 5 月 28 日
I'm trying to use matlab to ssh into a remote server and then use that to run some unix comands. However, as soon as the remote server is started all the following commands in my shell script to do not get executed. Is there any way to fix this?
Here's what I have in matlab:
system('sh runtycho.sh','-echo');
here's the shell script:
ssh tycho && cd Desktop/Saltmap_Project && davinci
here's what i end up with in the command line:
[edas@tycho ~]$ exit
logout
Connection to tycho.cpex.labs.stonybrook.edu closed.
runtycho.sh: line 1: cd: Desktop/Saltmap_Project: No such file or directory
I had to hit exit to move the code forward.
  1 件のコメント
Walter Roberson
Walter Roberson 2022 年 5 月 28 日
https://www.mathworks.com/matlabcentral/fileexchange/35409-ssh-sftp-scp-for-matlab-v2 possibly

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by