If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Send command to matlab

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-28-09, 09:27
zeeb10 zeeb10 is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
Send command to matlab

i guy ... if i run matlab in background

Code:
shell$ matlab &
how can i send command from terminal to matlab ...

Reply With Quote
  #2 (permalink)  
Old 03-09-09, 16:04
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,455
Talking pipe it!

Try something like this:
Code:
exec 4>&1
matlab >&4 2>&4 |&
print -p My_Matlab_Command
print -p whatever_command
print -p exit
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
  #3 (permalink)  
Old 03-10-09, 05:01
zeeb10 zeeb10 is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
don't work ...
Reply With Quote
  #4 (permalink)  
Old 03-10-09, 11:08
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,455
Cool Errors?

Quote:
Originally Posted by zeeb10
don't work ...
What eroros do you get?

Post EXACTLY what you are executing...
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
  #5 (permalink)  
Old 03-11-09, 06:35
zeeb10 zeeb10 is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
shell#> matlab >&4 2>&4 |&
-bash: syntax error near unexpected token `&'
--------------------------------------------------------
if i do :

shell#> matlab -nodisplay -nosplash -nojvm >&4 2>&4 &
shell#> print -p prova\(\'\.\/3\.jpg\'\)
-bash: print: command not found
Reply With Quote
  #6 (permalink)  
Old 03-11-09, 12:56
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,455
Cool Os

What OS?
Which shell?

The example I posted work with Solaris, HPUX and RH Linux using ksh or bash shell.

__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On