tags:

views:

44

answers:

3

I have recently learned, that in MATLAB, the "!" mark runs the code in a command line and follwed by the "&" will pull up the command window, FOR EXAMPLE:

!RUN_FILE.bat&

It was a great day when I discovered this, or should I say when someone told me this. Anyways I was wondering if there was a way to run this batch file on a linux machine that I am connecting to remotley with a Windows desktop? (I am a newbie when it come to anything Linux, so if it doesn't make sense let me know and please dumb down you answers if you don't mind) haha

THANKS, ME

+1  A: 

Windows and Linux use different shell scripting languages, so you couldn't run a .bat directly on Linux, but could create a bash script to perform the same actions.

Karl Bielefeldt
+1  A: 

The Linux shell doesn't understand batch files. That's not to say that the batch file can't be re-written to work in the Linux shell. Post some more information about the Linux shell you are using and your batch script and perhaps we can help you port it to Linux.

On a second read of your question, I interpreted it a different way. Are you running Matlab on a Linux machine that you are remotely connected to, or are you running Matlab on your local Windows machine and you want to send the ! command to the remote Linux box?

If the latter is true, then you should probably be able to write a batch file (to run from Matlab) that will launch the remote script on the Linux box. How are you connected to the Linux machine? VNC? SSH?

bta
I am running on a windows machine and want to send a script to run on a linux remote system
dewalla
+1  A: 

You might want to see this bat2bash online converter (I prefer re-writing though): http://www.filegod.netfirms.com/Bat2Bash.html

AmirW