#!/bin/bash
if [ $# -lt 1 ] ; then
        echo "(Bourne) shell script for R.matlab scripts"
        echo "Will submit serial batch R Matlab script"
        echo "Usage: your_script.R"
        echo "Written by Mark Rempel"
        exit 1
fi
script=$1
args=$2
filename=$(basename "$script")
extension="${filename##*.}"
    
# start the R process and keep it in the foreground
R --slave --vanilla --args $args < $script >> output.$script.txt
