You'll get better results to your questions if you post in forums more appropriate to your questions (eg. networking instead of Education and Science).
First, what exactly is the error message / error code ?
When you run you script over ssh, the shell's working directory will be "user"'s home directory. I presume foldername is the same as /home/user/foldername (or equivalent). So you are telling the remote shell to run the command myscript.sh by a relative pathname (foldername/myscript.sh). However, your script is assuming that the file matlabfile is either in user's home directory, or that matlab knows where to find it by name.
What directory is your matlabfile located in?
Add the code to the beginning of your script:
Code:
echo $PATH
pwd
ls -l matlabfile
This should make things a little more clear.
Finally, save yourself a little typing. Add
as the first line of your script and then:
Code:
chmod a+x foldername/myscript.sh
Then you can just type foldername/myscript without "sh" preceeding, as well as:
Code:
ssh user@server.edu foldername/myscript.sh
MrC
Bookmarks