Running matlab script from within bash script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running matlab script from within bash script
# 1  
Old 02-17-2011
Running matlab script from within bash script

Hi guys,

I'm new to scripting and I'm wondering if I can run a matlab script from within a bash script.

Basically, at the minute I have a bash script which creates a file "bottfile.xyz"

I then import "bottfile.xyz" into matlab using importdata('bottfile.xyz'). Then I just run the matlab script and away it goes.

So is there a way for me to just run my bashscript, and get it to run the matlab script also?

Thanks a lot,
J
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running nmap via bash script

Hello fellow scripters... I am trying to set up a script for work that reads the contents of a file of IP address and network names, takes these and runs a given nmap scan against them and then saves the output to a file with the filename of the network name. Such as... IP file looks like... (4 Replies)
Discussion started by: hawkeyesc72
4 Replies

2. Shell Programming and Scripting

Bash shell script to check if script itself is running

hi guys we've had nagios spewing false alarm (for the umpteenth time) and finally the customer had enough so they're starting to question nagios. we had the check interval increased from 5 minutes to 2 minutes, but that's just temporary solution. I'm thinking of implementing a script on the... (8 Replies)
Discussion started by: hedkandi
8 Replies

3. Shell Programming and Scripting

script running by sh but not by bash

execute the attached script as, bash -x INFA_MAP_GEN_XML.sh "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/SOURCE" "INFA_TEMPLATE.csv" "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/TARGET" "UNIX" "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/SETUP"... (5 Replies)
Discussion started by: 120945
5 Replies

4. Shell Programming and Scripting

Output of matlab as a variable for shell script

I'm running a matlab code within a shell script. This is how I do it, matlab -nodesktop -nosplash -nojvm -r "my_program;quit" This works fine. My matlab code prints out a single number, say "ans = 10" for example. I want to assign this to a variable in the shell script. I tried doing this... (18 Replies)
Discussion started by: lost.identity
18 Replies

5. UNIX for Dummies Questions & Answers

Help Running a Check in Bash Script

Hey guys, so I wrote a small script that pretty much just takes in two numbers and counts from the first to the second, e.g. unknown-hacker|544> count.sh 1 3 1 2 3 My problem is I want to make it so that if you input invalid parameters, such as non-numerical characters, more than 2... (2 Replies)
Discussion started by: Duo11
2 Replies

6. UNIX for Dummies Questions & Answers

Running Executable in Bash Script

Hey guys, so I've been trying to write a bash script called runSorter.sh that runs an executable that also takes in some parameters and outputs the results to a text file. The executable, sorter, takes in a number parameter. I want to make it so that you can input as many number parameters into... (4 Replies)
Discussion started by: Duo11
4 Replies

7. Shell Programming and Scripting

Validate BASH script before running it...

Hello, Is there some way to validate a bash script before running it. I want to make sure all of the syntax and everything is good so that I dont get a false return code. Thanks, tom (7 Replies)
Discussion started by: tjones1105
7 Replies

8. Shell Programming and Scripting

Script running in bash 3.0 not in 3.2

I have wasted one working day writing this scripts. It compares two folders and make a good tabbed report about their differences. #!/bin/bash function DRAW_DEPTH () { ROUND=$1 while do printf %s " " ROUND=`expr $ROUND - 1` done printf %s "|- " } function MAIN () {... (9 Replies)
Discussion started by: trutoman
9 Replies

9. UNIX for Advanced & Expert Users

debugging an already running bash script

# ps -ef | grep rc root 13903 1 0 08:56 ? 00:00:00 /usr/sbin/automount --timeout=60 /archive file /etc/auto_archive root 10706 1 0 08:55 ? 00:00:00 /bin/bash /etc/rc.d/rc 3 root 2933 20071 0 19:38 pts/1 00:00:00 grep rc Is there any way to debug the... (1 Reply)
Discussion started by: marcpascual
1 Replies

10. Shell Programming and Scripting

Running a script from script (bash)

Hello I am a UNIX noob, attempting to use Cygwin on Windows XP to build a program. I am trying to get a few scripts together that can automate some tasks and I have run into a problem. Basically this is related to calling one script from another. I found this thread in my search but am too... (1 Reply)
Discussion started by: bobban
1 Replies
Login or Register to Ask a Question
script(1)							   User Commands							 script(1)

NAME
script - make record of a terminal session SYNOPSIS
script [-a] [filename] DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the record is saved in the file typescript. See WARNINGS. The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends when the forked shell exits or when Control-d is typed. OPTIONS
The following option is supported: -a Appends the session record to filename, rather than overwriting it. NOTES
script places everything that appears on the screen in filename, including prompts. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a privileged user, that is, root. Be sure that typescript is not a link before running script. SunOS 5.11 30 Jan 2004 script(1)